i want an output and i have tried but can't get this...
#include <cstdlib>
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
int r,c,s;
for(s=15,r=6;r>=1;r--,s++)
{
cout<<setw(s);
for(c=1;c<=r;c++)
cout<<"X"<<endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
OUTPUT: X X X X X X
X X X X X
X X X X
X X X
X X
X
above is the code and its output tell me where i am wrong and how to correct it...also tell me the corrected code and how these loops are controlling X ?????