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 does emoji p mean?
How can I do peek and poke in c?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
Write a C program to fill a rectangle using window scrolling
the maximum value that an integer constant can have is a) -32767 b) 32767 c) 1.701e+38 d) -1.7014e+38
What will the preprocessor do for a program?
Given an unsigned integer, find if the number is power of 2?
what is the difference between auto and static keywords
1 Answers cDot, College School Exams Tests, TCS,
what is array?
What is difference between far and near pointers?
Develop a program that computes the new price of an item. The program should receive a character variable colour and a double precision floating-point variable price from the user. Discount rate is determined based on the colour of the discount sticker, as shown in the following table. An error message should be printed if an invalid colour has been entered
how many keywords are available in 'c' language a) 32 b) 34 c) 45 d) 48