APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2017

Term : DECEMBER

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:12





PDF Text (Beta):

getch ();

Eg: program to display even numbers &odd numbers from 1 ton

void main ()

drscr();
printf("enter the values of n");
scanf("%d", &n);
printf("even numbers from 1 to %d ", n);

while(i<=n)

{
if(i%2==0)
printf("%d \t",
i);
i++;
}

printf("odd numbers from 1to %d ", n);
i=1;

while(i<=n)

{
if(i%2==1)
printf("%d\t",
i);
i++;
}
getch();

Similar Question Papers