Baha Ammo

Baha Ammo

  • NA
  • 17
  • 500

Translate the Pseudocode program into a single C# (Java or Python)

Apr 28 2021 9:48 PM
- A program file, C#  with your code interpretation of the pseudocode.
 
program project 
String x;
Boolean f;
integer a,z,g;
x = readinput;
g = length of x;
z = g minus one;
a = zero
if g = 1 then
f = 1
else
f = 1;
while f=1
and a less than z
while character at a of x is one of [whitespace,comma,semicolon, exclamation_mark, question_mark, or full stop] a++;
while character at z of x is one of [whitespace,comma,semicolon, exclamation_mark, question_mark, or full stop] z--;
if the toUpperCase of character at a of x is identical to the toUpperCase of character at z of x then a++ and z--; else f=0; if f=0
then
print out appropriate message
else print out other appropriate message

Answers (1)