C program to print 1 11111 1111

Solved
Amrit - Updated on Jan 25, 2019 at 11:42 AM
agrajtech17 Posts 1 Registration date Saturday May 22, 2010 Status Member Last seen May 22, 2010 - May 22, 2010 at 04:25 AM
Hello,

How can I make a program in c language to print following series---
1 11 111 11111
or
1 11 123 1234
System Configuration: Windows XP / Firefox 3.5.2
Related:

1 response

agrajtech17 Posts 1 Registration date Saturday May 22, 2010 Status Member Last seen May 22, 2010 19
Updated on Jan 25, 2019 at 11:43 AM
part one 1 11 111 11111


for(int i=1;i<=10;i++) 
{ 
  for(int j=1;j<=i;j++) 
    printf("%d",1); 
printf("  "); 
} 




part two 1 12 123 1234

for(int i=1;i<=10;i++) 
{ 
  for(int j=1;j<=i;j++) 
    printf("%d",j); 
printf("  "); 
} 
19