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

Describe static function with its usage?

717


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

719


In which layer of the network datastructure format change is done

1524


Write a program on swapping (100, 50)

762


how is the examination pattern?

1693






Differentiate between null and void pointers.

729


What is the use of #define preprocessor in c?

712


what is bit rate & baud rate? plz give wave forms

1625


What is data structure in c and its types?

699


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

717


Write a program to implement queue.

746


How can I get the current date or time of day in a c program?

742


How many main () function we can have in a project?

721


Is c is a procedural language?

711


What is a far pointer in c?

695