write a C program to print right angled triangle of Numbers
1
12
123
1234
12345
main()
12
123
1234
12345
main()
{
int i,j,n;
clrscr();
printf("Enter the number of Rows:");
scanf("%d",&n);
for(i=1;i<=n;++i)
{
for(j=1;j<i;++j)
{
printf("%d",j);
}
printf("\n");
}
getch();
No comments:
Post a Comment