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


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of a heap?

710


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

721


Explain what will the preprocessor do for a program?

605


Did c have any year 2000 problems?

655


What is define directive?

640






What is a constant and types of constants in c?

602


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.

602


What does nil mean in c?

672


#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); }

717


What is the purpose of scanf() and printf() functions?

723


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15504


find the sum of two matrices and WAP for it.

632


What is graph in c?

583


What is an lvalue?

636


Why dont c comments nest?

621