1write Psuedo Code Summer Vacation Includes 3 Different Variables Must Assigned Used Inclu Q37108878

1.Write Psuedo Codefor your Summer Vacation

Includes 3 different variables and they must be assignedand used

Include at least 2 different IF statements

Include one LOOP


Solution


PROGRAM count and print even odd numbers from 0-10
j=10;
evenCount=0;
oddCount=0;
FOR i=1 to j DO
IF(i%2==0)
THEN
evenCount=evenCount+1;
END IF;
IF(i%2!=0)
THEN
oddCount=oddCount+1;
END IF;
END FOR
Print evenCount;
print oddCount;
END

if you like the answer please provide a thumbs up.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.