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
What are the data types present in c?
What is a MAC Address?
Can two or more operators such as and be combined in a single line of program code?
simple program of graphics and their output display
Explain spaghetti programming?
How can I get back to the interactive keyboard if stdin is redirected?
How many keywords are there in c?
How can you increase the allowable number of simultaneously open files?
Explain what is a 'locale'?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is meant by high-order and low-order bytes?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is a constant and types of constants in c?
What is the use of typedef in structure in c?
What is register variable in c language?