hi guys ...i can,t get to display dis an empty diamond using setw...i,ve written some ov the code..its incomplete..cant get any further..please help! i,ve to submit it in 6 hours.
Code:* * * * * * * * * * * * #include <iostream.h> #include <iomanip.h> int main() { int a,b,c,d,e,x,y,z; cout<<"enter no. of rows"<<endl; cin>>a; for (x=1; x<=a; x++) { cout<<setw(x)<<"*"<<endl; } for (y=10; y>=a; y--) { cout<<setw(y)<<"*"<<endl; } return 0; }