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 |
What are dangling pointers in c?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
How can I sort more data than will fit in memory?
int j =15,i; for (i=1; 1<5; ++i) {printf ("%d%d ",j,i); j = j-3; }
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?
Is it possible to pass an entire structure to functions?
What is file in c language?
What are the 4 types of programming language?
Write a C program that reads a series of strings and prints only those ending in "ed"
How pointer is benefit for design a data structure algorithm?
what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer