Answer to Question #326068 in C++ for Prince

Question #326068

ewrite the following C++ code in pseudocode. (5)

for (int x = 1; x <= 10; x++) {

for (int y = 10; y >= x; y--) {

if (y % 2 == 0) {

cout << "*";

}

else {

cout << "#";

}

}

cout << endl;


1
Expert's answer
2022-04-08T16:05:58-0400
x <- 1
while x <= 10 do
    y <- 10
    while y >= 10
        if y mod 2 is 0
            output '*'
        else
            output '#'
        y <- y-1
    x <- x+1
output end_of_line

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS