1
Answer

Converting Pseudo Code into C# language..

Ask a question
Kevin

Kevin

14y
4.7k
1
// get a number between 1 and 10 inclusive
PRINT "Please type a number between 1 and 10 inclusive: "
READ N
DOWHILE (N < 1 OR N > 10)
PRINT "Sorry, your number is invalid."
PRINT "Please type a number between 1 and 10 inclusive: "
READ N
ENDWHILE
// display headings
PRINT "X * Y | "
Y = 1
DOWHILE Y < 13
PRINT Y in a field of 4 characters
Y = Y + 1
ENDWHILE
PRINT a return character to start a new line
// display heading underline
PRINT "========"
Y = 1
DOWHILE Y < 13
PRINT "===="
Y = Y + 1
ENDWHILE
PRINT a return character to start a new line
// compute and display something
X = 1
DOWHILE X < N + 1
PRINT X in a field of 7 characters
PRINT "|"
Y = 1
DOWHILE Y < 13
A = X * Y
PRINT A in a field of 4 characters
Y = Y + 1
ENDWHILE
PRINT a return character to start a new line
X = X + 1
ENDWHILE
END

I'm having trouble changing that into C# code, can someone help.

Answers (1)