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.
Hint:-
Display only five integers per line.
#include< #include< 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 |
---|
0 comments:
Post a Comment