Showing posts with label square number triangle 1 149 1491625. Show all posts
Showing posts with label square number triangle 1 149 1491625. Show all posts

2.18.2014

Square Number Triangle

Q. Write a C program to print the following square number triangle as:

1
1 4 9
1 4 9 16 25
1 4 9 16 25 36 49
1 4 9 16 25 36 49 64 81

Ans.

/*c program for square number triangle*/
#include<stdio.h>
int main()
{