Saturday, 11 August 2012

All Odd and Even Number

Write a program to find all Even and Odd Number Between 100.

Answer :

#include<stdio.h>
#include<conio.h>

int i:

void main();
{
int n=99;
clrscr ();
printf("All odd Number\n\n");
for (i=1;i<=n;i=i+2)
printf("%d",i);
printf("\n\nAll Even Number\n\n");
for (i=2;i<=100;i+=2)
printf("%d",i);
getch ();
}

cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com
Result:
cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com

No comments:

Post a Comment