write a program to print the all 4digits numbers & whose
squares must me even numbers?
Answer Posted / 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 |
Post New Answer View All Answers
Explain the properties of union.
How do you define structure?
How to compare array with pointer in c?
What is nested structure with example?
Can we add pointers together?
What is the difference between if else and switchstatement
What is 2c dna?
What are the advantages and disadvantages of a heap?
C language questions for civil engineering
Explain what is the stack?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
Is c programming hard?
What is a program flowchart and explain how does it help in writing a program?
Compare interpreters and compilers.
What is pointer to pointer in c?