Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Tuesday, March 2, 2010

Write a program in C to display the number form 1 2 3 4 .................100. Display only five integers per line.

Write a program in C to display the number form 1 2 3 4 .................100.
Display only five integers per line.


#include<stdio.h>
#include<conio.h>
main( )
{
int i;
clrscr( );
for (i=1; i < = 100; i++)
{
printf("%16d", i);
} return(0);
}

Hint:-


5 values per line = 80/5 = 16 = %16d
4 values per line = 80/4 = 20 = %20d
8 values per line = 80/8 = 10 = %10d


Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP