0

I need help to make this program
be output
*******E
*
**
***
**O****>
***
**
*
*******E
Thanks for helping

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by RyanMcMillan
0

What have you tried so far?
Help is not free - especially the kind of help you are asking for.

0
#include<iostream>
using namespace std;
int main() {
    for(int i=1; i<2; i++){
        for (int j=1; j<=9; j++){

            if(((i==1) && ((j==1)) || ((i==1) && (j==9))){
                cout<<"*******E\n";}
            else if (((i==1) && (j==2)) || ((i==1) && (j==8))){
                cout<<"*\n";}
            else if (((i==1) && (j==3)) || ((i==1) && (j==7))){

                cout<<"**\n";}
            else if (((i==1) && (j==4)) || ((i==1) && (j==6))){
                cout<<"***\n";}
            else if ((i==1) && (j==5)){
                cout<<"**O****>\n";}

Edited by Nick Evan: Fixed formatting

0

you could just use the easy way

cout << "*******E\n" << "*\n" << "**\n" << "***\n" << "**O****>\n" << ***\n" << 
"**\n" << *\n" << "*******E\n\n";
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.