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...
#include<iostream>
using namespace std;
int main(){
int VALUE=0;
cout<<"inter VALUE: ";
cin>>VALUE;
cin.ignore();
for(int i = 0; i < VALUE; i++)
{
cout << "*" <<flush;
}
a little help for the newbie guys.. thnx alot..

Code tags:

[code]
paste code here
[/code]

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:

[code]
**
****
******
[/code]

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.