How many times 3 occurs between 3 to 3333

Showing Answers 1 - 15 of 15 Answers

hari

  • Jan 4th, 2006
 

It comes 998 times.

  Was this answer useful?  Yes

Moumita

  • Jan 15th, 2006
 

I am very sorry to say that you should give the trick inspite of giving the answer only.It will help us more.

  Was this answer useful?  Yes

SHAILESH

  • May 30th, 2006
 

how many times 3 occurs between 3 to 3333

  Was this answer useful?  Yes

ashish sinha

  • Jun 23rd, 2006
 

The number 3 never appears between 3 to 3333. The digit 3 does appear many times ... probably 998 times (or something like that, as the person above has mentioned). So the answer is 0.

  Was this answer useful?  Yes

siva

  • Oct 27th, 2006
 

Hi guys,I have written a code (in perl) to find it out.. what it does is it takes the numbers from 3 to 3333,divide each number into digits and checks whether it's 3 or not.. and increments the count..The answer I found out is 1336.my($i,$dig,$tmp);my($count)=0;for($i=3;$i<=3333;$i++){$tmp = $i;while($tmp!=0){$dig = $tmp%10;$tmp=$tmp/10;if($dig == 3){$count++;}}}print "$countn";

  Was this answer useful?  Yes

ghasagar

  • Apr 20th, 2007
 

see if this perl snippet works for you..

print "how many times 3 occurs between 3 to 3333?n answer:n";

my @nums = (3..3333);
foreach  (@nums) {
 my @tmp_counter = ($_ =~ m/3/g);
 $final_count += eval($#tmp_counter+1);
}
print "final : $final_count n";

output :
how many times 3 occurs between 3 to 3333?
 answer:
final : 1336

sagar

  Was this answer useful?  Yes

vijay

  • Jun 13th, 2007
 

main() {
int i=3,temp=0,d,c=0;
for(;i<=3333;++i)
{
 temp=i;
 while(temp!=0)
 {
  d=temp%10;
  if(d==3)
   c++;
  temp=temp/10;
 }

}
printf("%d",c); }



ans: 1336 times

pushpa

  • Oct 16th, 2011
 

1336

  Was this answer useful?  Yes

David

  • Nov 12th, 2011
 

3 as digit appear each 10 iterations. 3,13,23,33,43...

In each iteration I count number of digits with value of 3 and add to total sum.
Then increment number by 10

Code
  1.  

  Was this answer useful?  Yes

sridhar s l

  • Jan 19th, 2012
 

The answer is 1336

Code
  1. #include<stdio.h>

  2. #include<conio.h>

  3. #include<stdlib.h>

  4. #include<string.h>

  5. "%d",k);

  6.  getch();

  7. }

  8.  

  Was this answer useful?  Yes

ASMIT BASU

  • Feb 18th, 2012
 

Code
  1. #include <stdio.h>

  2. #include <conio.h>

  3. //variable declaration  //calculating the remainder and if its 3 then the flag is imcreased by 1//reducing the number 3333 to 333 to 33 to 3 //if the last number left is 3 (since 3/10 would give 0) then increase the flag"the number of 3s are %d", f);

  Was this answer useful?  Yes

Dinesh

  • Sep 14th, 2012
 

1336

  Was this answer useful?  Yes

Naren

  • Aug 5th, 2023
 

from (0-9) there in 1 three
from (0-99) (including units and tens place) there are 20 threes
from (0-999) there are (20*10=200) threes + 100 threes (300-399) = 300 threes
therefore total number of threes from (0-2999) = 300*3=900 threes
then in (3000-3333)
in thousands place from(3000-3333) there are 333+1=334 threes
in 100s place from(3300-3333) there are ( 1+33) = 34 threes
in 10s place from(3000-3333) there are (10 +10 +10 +4) = 34 threes(4:3330,3331,3332,3333)
in 1s place from (3000-3333) there are (10 +10 +10 + 4) = 34 threes(4:3303,3313,3323,3333)
therefore total number of threes are = 1336

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions