write a program to print the all 4digits numbers & whose
squares must me even numbers?
Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
int i,p;
printf("\nNumbers are ");
for(i=1000;i<=9999;i++)
{
p=(i*i);
if(p%2==0)
{
printf("%d\n",i);
}
}
getch();
}
Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What are the advantages and disadvantages of a heap?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Explain what will the preprocessor do for a program?
Did c have any year 2000 problems?
What is define directive?
What is a constant and types of constants in c?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What does nil mean in c?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is the purpose of scanf() and printf() functions?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
find the sum of two matrices and WAP for it.
What is graph in c?
What is an lvalue?
Why dont c comments nest?