Friday, November 20, 2009
C question and answer
16. PRINTING ASCII VALUE
void main()
{
int i;
clrscr();
for(i=0;i<=255;i++)
{
printf("%d -> %c ",i,i);
delay(10);
}
getch();
}
17. CHECKING LEAP YEAR
void main()
{
int year;
clrscr();
printf("Enter any year->");
scanf("%d",&year);
if(((year%4==0)&&(year%100!=0))||(year%400==0))
printf("%d is a leap year",year);
else
printf
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment