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


Please Help Members By Posting Answers For Below Questions

Explain the properties of union.

602


How do you define structure?

555


How to compare array with pointer in c?

610


What is nested structure with example?

613


Can we add pointers together?

606






What is the difference between if else and switchstatement

1305


What is 2c dna?

595


What are the advantages and disadvantages of a heap?

695


C language questions for civil engineering

1233


Explain what is the stack?

625


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.

2147


Is c programming hard?

565


What is a program flowchart and explain how does it help in writing a program?

659


Compare interpreters and compilers.

630


What is pointer to pointer in c?

626