Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

count the numbers between 100 and 300, that star
with 2 and ends with 2

Answer Posted / amit sachan

int main()
{
int r,i,q,count=0;
for(i=100;i<300;i++)
{
r=i%10;
q=i/100;
if(r==2&&q==2)
count++;
}
printf("the total no=%d",count)
return(0);
}

Is This Answer Correct ?    40 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5505


What is difference between %d and %i in c?

1310


What is c variable?

1101


Differentiate between the = symbol and == symbol?

1368


What is the use of clrscr?

1157


Is there a built-in function in C that can be used for sorting data?

1342


How can I read in an object file and jump to locations in it?

1072


Can you define which header file to include at compile time?

1072


What are different storage class specifiers in c?

1138


What is static and volatile in c?

1266


What is an arrays?

1139


Is it better to use malloc() or calloc()?

1178


Which is better between malloc and calloc?

1255


Differentiate between Macro and ordinary definition.

1469


Write a program to show the change in position of a cursor using c

1125