Showing posts with label 1 121 1231 12341 123451. Show all posts
Showing posts with label 1 121 1231 12341 123451. Show all posts

8.23.2013

Number Triangle Design

Q. Write a C program to design the number triangle pyramid as:

1
121
1231
12341
123451

Ans.

/*c program for number triangle design*/
#include<stdio.h>
int main()
{
 int num,r,c,z;
 printf("Enter No. of rows : ");
 scanf("%d", &num);