C program to print 1 11111 1111 [Solved/Closed]

Report
-
Posts
1
Registration date
Saturday May 22, 2010
Status
Member
Last seen
May 22, 2010
-
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

1 reply

Posts
1
Registration date
Saturday May 22, 2010
Status
Member
Last seen
May 22, 2010
11
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("  "); 
} 
11
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 4235 users have said thank you to us this month