Create pseudocode about this output.
Choices:
d. Calculator
e. Odd or Even
f. Positive or Negative Number
Enter your choice: c
Enter a number: -6
-6 is a negative number.
1. Print "Choice"
2. Print "a. Calculator"
3. Print "b. Odd or Even"
4. Print "c. Positive or Negative Number"
5. Print "Enter your choice:"
6. Get ans
7. If ans is 'a' go to step 10
8. If ans is 'b' go to step 23
9. If ans is 'c' go to step 30
10. Print "Enter first number:"
11. Get num1
12. Print "Enter second number:"
13. Get num2
14. Set res as num1 + num2
15. Print 'Sum is", res
16. Set res as num1 - num2
17. Print 'Difference is", res
18. Set res as num1 * num2
19. Print 'Product is", res
20. Set res as num1 / num2
21. Print 'Quotione is", res
22. Go to step 36
23. Print "Enter a number:"
24. Get num
25. If num % 2 is 0
26. Print "Even"
27. Else
28. Print "Odd"
29. Go to step 36
30. Print "Enter a number:"
31. Get num
32. If num less than
33. Print "Negative"
34. Else
35. Print "Positive"
36. Exit
Comments
Leave a comment