write a program for even numbers?

Answer Posted / mehak saini

include<stdio.h>
include<conio.h>
void main()
{
inti,num;
printf("enter the number")
scanf(%d",&num);
for(i=1;i=<num;i+1)
{
if(i%2==0)
{
printf("%d",i);
}
}
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue?

794


Describe explain how arrays can be passed to a user defined function

784


Explain null pointer.

763


How do you define structure?

734


What functions are used for dynamic memory allocation in c language?

742






List the variables are used for writing doubly linked list program.

1756


Explain how do you determine whether to use a stream function or a low-level function?

781


What is operator precedence?

813


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3212


Is c is a procedural language?

767


Write a code to determine the total number of stops an elevator would take to serve N number of people.

919


Under what circumstances does a name clash occur?

846


What is && in c programming?

830


How can my program discover the complete pathname to the executable from which it was invoked?

800


How many types of operators are there in c?

757