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 is clrscr ()?
while initialization of array why we use a[][2] why not a[2][]...?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
Is a house a shell structure?
What is property type c?
What is extern storage class in c?
What is time complexity c?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
Can we declare function inside main?
Explain how can you tell whether a program was compiled using c versus c++?
What is data structure in c language?
What is the significance of c program algorithms?
What are reserved words with a programming language?
What is character constants?
what are # pragma staments?