+ 1
Can anyone tell me about logical operators
11 Respostas
+ 3
Hello @cyreen
here your code however, it is using pattern not graphics so if you want this program using graphics then i am sorry for that. But using pattern here it is:
#include <iostream>
using namespace std;
void constructTriangle(int h)
{
int i,j,k,l,m;
cout<<endl<<endl;
for (i=h;i>0;i--)
{
for (k=0;k<i;k++)
{
cout<<" ";
}
for(j=h;j>=i;j--)
{
cout<<"*";
}
for (m=h;m>i;m--)
{
cout<<"*";
}
for (l=0;l<i;l++)
{
cout<<" ";
}
cout<<endl;
}
}
int main() {
int height;
cout<<"Enter height of triangle:";
cin>>height;
constructTriangle(height);
return 0;
}
+ 2
Here is the complete information for logical operator in c++:
https://www.tutorialspoint.com/cplusplus/cpp_operators.htm
+ 2
Try code blocks its a great c/c++ compiler also it has gnu gcc compiler.
+ 2
If you need any help feel free to ask.
+ 2
You're Welcome
@cyreen
+ 1
thanks
+ 1
how to download gnu c++ compiler
+ 1
welcome
+ 1
can you help me please?
i want to write c++ program with function that recive the hight of triangle then draw it đžđč
+ 1
Thank you very much Vishal đâ€
+ 1
Thank you again vishal I've tried it and worked đâ€đ