/* Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use ten printf statements; use two nested loops instead. You'll have to use braces around the body of the outer loop if it contains multiple statements. */ #include #include void main() { int i,j,n,x; clrscr(); printf("Range: "); scanf("%d",&n); for(i=1;i<=n;i++) // Outer loop starts { x=i%2?1:i; for(j=1;j<=x;j++) // Inner loop starts printf("*"); // Inner loop ends printf("\n"); } // Outer loop ends }