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
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.
What is difference between %d and %i in c?
What is c variable?
Differentiate between the = symbol and == symbol?
What is the use of clrscr?
Is there a built-in function in C that can be used for sorting data?
How can I read in an object file and jump to locations in it?
Can you define which header file to include at compile time?
What are different storage class specifiers in c?
What is static and volatile in c?
What is an arrays?
Is it better to use malloc() or calloc()?
Which is better between malloc and calloc?
Differentiate between Macro and ordinary definition.
Write a program to show the change in position of a cursor using c