C++ Hotspot For Beginners
triangle shape
Program to generate following output
#include <iostream.h>
#include <conio.h>
int main()
{
for (int i=0; i<=5; i++)
{
cout<<endl;
for(int j=1;j<=i;j++)
cout<<" "<<j;
}
getch();
return 0;
}
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment