code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3
Answer Posted / k
#include<iostream.h>
int main()
{int i,j,k;
for(i=1;i<=3;i++)
{cout<<"\n";
for(j=1;j<=3-i;j++)
cout<<" ";
for(k=i;k>0;k--)
cout<<i<<" ";
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
a program that can input number of records and can view it again the record
What is a substring in c?
how to find binary of number?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
explain what is fifo?
In a byte, what is the maximum decimal number that you can accommodate?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What are the differences between Structures and Arrays?
How do you generate random numbers in C?
What are the back slash character constants or escape sequence charactersavailable in c?
What is a built-in function in C?
When do we get logical errors?
what is uses of .net
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What are valid signatures for the Main function?