write a program for even numbers?

Answer Posted / shruti

to print numbers which are even from 0 to 100

main()
{
int i;

puts("THE EVEN NUMBERS ARE:");

for(i = 0 ; i <= 100 ; i++)
{
if(i%2 == 0)
printf("%d", i);
}

}

Is This Answer Correct ?    23 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain built-in function?

593


What is an example of structure?

588


What does c mean in basketball?

563


What is c++ used for today?

666


Can you define which header file to include at compile time?

589






What is the advantage of using #define to declare a constant?

621


What are external variables in c?

546


What is structure and union in c?

602


Write a program to reverse a given number in c?

600


How we can insert comments in a c program?

632


What language is c written?

577


What are header files why are they important?

580


Explain the red-black trees?

609


Explain how are portions of a program disabled in demo versions?

655


Tell me is null always defined as 0(zero)?

674