guys... im on a program now.. i have this prob...
that when u inter a number a asterisk would be the out put in a form of a trapezoid...

i got stuck hir guys...
using namespace std;
int main(){
int VALUE=0;
cout<<"inter VALUE: ";
for(int i = 0; i < VALUE; i++)
cout << "*" <<flush;
a little help for the newbie guys.. thnx alot..

9 Years
Discussion Span
Last Post by Hiroshe

Code tags:

paste code here

You have no newlines, so everything will be on one line. Is a trapezoid all on one line? No, so you need newlines in there. And do you have enough information to draw a trapezoid? You ask for one dimension. Look at the trapezoid below:


At the very least, ask for a top and a bottom length and a height. Asking for "value" is confusing. What does "value" represent? Even that won't be enough if you can't assume that the trapezoid is isosceles.

Edited by happygeek: fixed formatting


Ahh, thats what you were asking. Try subracting two asterics from each row (and 4 on the next, etc..), and adding a space in front (again, 2 on the next etc..). You need somewhere to stop it though, or it might turn into a triangle!:P Again, it looks like your missing a swerly bracket at the end of that code.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.