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
how do you execute a c program in unix.
What is FIFO?
What are the differences between new and malloc in C?
What is bubble sort in c?
Which programming language is best for getting job 2020?
What is #ifdef ? What is its application?
Why is #define used?
Is c weakly typed?
How do you write a program which produces its own source code as output?
Can you please compare array with pointer?
What is null in c?
What is character set?
If errno contains a nonzero number, is there an error?
What is the use of linkage in c language?
Describe how arrays can be passed to a user defined function