code snippet for creating a pyramids triangle
ex

1
2 2
3 3 3

Answer Posted / manvi

main()
{
int i,j,n;
printf("enter the limit");
scanf("%d",&n);
for(i=1;i<=n;i++)
{

for(j=0;j<i;j++)
{
printf("%d",i);
}
printf("\n");
}

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why structure is used in c?

590


What are the advantages of external class?

594


Why is void main used?

621


What does %2f mean in c?

674


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

623






a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

702


What is an lvalue?

636


What are the 4 types of unions?

609


Explain the advantages and disadvantages of macros.

622


Write a program to print factorial of given number without using recursion?

569


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1495


Sir i need notes for structure,functions,pointers in c language can you help me please

1943


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

813


Difference between exit() and _exit() function?

655


Difference between pass by reference and pass by value?

658