write a program to print the all 4digits numbers & whose
squares must me even numbers?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / abdur rab
Any even number squard will yield an even value
#include <stdio.h>
int main ( int argc, char* argv [] )
{
int nloop = 0;
for ( nloop = 1000; nloop < 10000; nloop++ ) {
if ( ( nloop ) % 2 == 0 ) {
printf ("\n The Number is : %d",
nloop );
}
}
return ( 0 );
}
| Is This Answer Correct ? | 2 Yes | 6 No |
Apart from dennis ritchie who the other person who contributed in design of c language.
how can we Declare a variable in c without defining it.
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
why r u join this company? give solid resons.
16 Answers IBM, Infosys, TCS,
main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }
What is meant by type casting?
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?
What is difference between union and structure in c?
What is the advantage of an array over individual variables?
What is s or c?
Write a Program to accept different goods with the number, price and date of purchase and display them