count the numbers between 100 and 300, that star
with 2 and ends with 2
Answer Posted / sujit
#include<stdio.h>
void main(void)
{
int i,d1,d2,count=0;
for(i=100;i<=300;i++)
{
while(i>0)
{
d1=i%10;
i=i/10;
d2=i%10;
i=i/10;
if(d1==2&&i==2)
count++;
}
}
printf("%d",count);
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Which is best linux os?
int far *near * p; means
What is ctrl c called?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Why is structure important for a child?
What is property type c?
What do you mean by keywords in c?
what is uses of .net
c language interview questions & answer
Is file a keyword in c?
What are the different types of control structures in programming?
What is a char in c?
What is data types?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Explain low-order bytes.