Create pseudocode about this output
Choices:
a. Calculator
b. Odd or Even
c. Positive or Negative Number
Enter your choice: a
Enter first number: 10
Enter second number: 5
The sum of 10 and 5 is 15
The difference of 10 and 5 is 5
The product of 10 and 5 is 50
The quotient of 10 and 5 is 2
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