Right Angled Triangle Shape using C++ Programming Language

Question Types:

program code for right angled triangle shape with inner surface empty ?

Program Code:

#include<iostream>
using namespace std;
int main()
{
int i, j;
for(i=1;i<=10;i++)
{
cout<<"-";

for(j=1;j<i;j++)
{
cout<<"  ";
}
cout<<"*";
cout<<"\n";
}
for(int l=0;l<20;l++)
cout<<"+";
cout<<endl;
}

Output:

.exe file

No comments:

Post a Comment

Please disable your ad blocker to support this website.

Our website relies on revenue from ads to keep providing free content.