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

How can my program discover the complete pathname to the executable from which it was invoked?

667


Can you pass an entire structure to functions?

708


What is a pointer variable in c language?

653


What are operators in c?

592


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

823






the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

656


How can I do graphics in c?

603


how to capitalise first letter of each word in a given string?

1440


What is scanf () in c?

672


define string ?

679


What is the 'named constructor idiom'?

647


Why n++ execute faster than n+1 ?

1873


The file stdio.h, what does it contain?

676


What are variables c?

632


What is the size of array float a(10)?

666