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

how do you execute a c program in unix.

1099


What is FIFO?

1657


What are the differences between new and malloc in C?

1125


What is bubble sort in c?

1034


Which programming language is best for getting job 2020?

1038


What is #ifdef ? What is its application?

1091


Why is #define used?

1266


Is c weakly typed?

1009


How do you write a program which produces its own source code as output?

1099


Can you please compare array with pointer?

1064


What is null in c?

1074


What is character set?

1156


If errno contains a nonzero number, is there an error?

1356


What is the use of linkage in c language?

1043


Describe how arrays can be passed to a user defined function

1272