PROJECT: For Find Even Number in the User Limit

Learn and Trouble Shoot Problems Related to C-Language here.

PROJECT: For Find Even Number in the User Limit

Unread postby rajeevmahura » Thu May 22, 2008 6:07 pm

PROJECT: For Find Even Number in the User Limit

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=0;
clrscr();
printf("Enter the Limit ");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
if(i%2==0)
{
printf("\n%d",i);
}
else
{
continue;
}
}
getch();
}
------------------------------------
Input: n=5
Output: 0
2
4
--Regards--
Rajeev Mahura
Servers & Storage Professional
http://about.me/rajeevmahura
User avatar
rajeevmahura
 
Posts: 144
Joined: Tue May 20, 2008 5:22 pm
Location: Bangalore | New Delhi
Full Name: Rajeev Mahura
Date Of Birth: 15 Jan 1984
Address: New Delhi
Profession: DOEACC Trainer
DOEACC Center: DOEACC DELHI
Mobile No: 0

Return to C-Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron