#include<stdio.h> int main() { long long int amp, fre, a,i,j,t,m,tc; scanf("%lld", &tc); for(t=1;t<=tc;t++) { scanf("%lld %lld", &, &fre); for(a=1;a<=fre;a++) { for(i=1; i<=amp; i++) { for(j=1; j<=i; j++) { printf("%lld", i); } printf("\n"); } for(i=amp-1; i>=1; i--) { for(j=1; j<=i; j++) { printf("%lld", i); } if(t==tc&&a==fre&&i==1) break; printf("\n"); } printf("\n"); } } return 0; }
Learn More :
Wave
Triangle
- Waveform Generation (Triangle Wave) C Program
- C Program To Show Pascal Triangle
- C Program to Print Floyd's Triangle
- C Program Nested Loop (inverted Triangle) C Code
- C Program to calculate the sum of elements of upper triangle of a n*n matrix using DMA
- Calculate sum of element of upper triangle of m*n matrix by using dynamic memory allocation
- Calculate sum of element of lower triangle of m*n matrix by using dynamic memory allocation
- Bitmap Triangle in C Program
- C Program to Rectangular Triangle Using Operator