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
How can I swap two values without using a temporary?
Difference between strcpy() and memcpy() function?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Explain what is the difference between #include and #include 'file' ?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What is double pointer?
How many bytes is a struct in c?
Why n++ execute faster than n+1 ?
What is New modifiers?
What is the difference between near, far and huge pointers?
all c language question
What is string length in c?
Create a simple code fragment that will swap the values of two variables num1 and num2.
What is the auto keyword good for?
What is stack in c?