question archive For each situation, provide a pseudocoded algorithm that would accomplish the task
Subject:Computer SciencePrice: Bought3
For each situation, provide a pseudocoded algorithm that would accomplish the task. Make sure to indent where appropriate.
Situation A
Create program that:
1)Takes the list lotsOfNumbers and uses a loop to find the sum of all of the odd numbers in the list (hint: use Mod).
2)Displays the sum.
Situation B
Create procedure that takes a positive integer as a parameter. If the number given to the procedure is no more than 30, the procedure should return the absolute difference between that number and 30. If the number is greater than 30, the procedure should return the number doubled.
Examples:
difference30(13) → 17
difference30(46) → 92
difference30(30) → 0
Situation C
Create procedure ConvertToBinary that takes an input as a number from 0 to 16 (including 0 but not 16) and converts it to a binary number. The binary number should be returned as a list.