Write nested for c++ loops to produce the following output.
×××× / / / / / / / / ××××
××× / / / / / / \ \ ×××
×× / / / / \ \ \ \ ××
× / / \ \ \ \ \ \ ×
\ \ \ \ \ \ \ \
#include <iostream>
using namespace std;
int main()
{
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
//
}
}
cout<<"\n×××× / / / / / / / / ××××";
cout<<"\n××× / / / / / / \ \ ×××";
cout<<"\n×× / / / / \ \ \ \ ××";
cout<<"\n× / / \ \ \ \ \ \ ×";
cout<<"\n\ \ \ \ \ \ \ \0";
return 0;
}
Comments
Leave a comment