Create detailed pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many weeks are left until Christmas. Use variables named weeks and days.
Following are the Pseudocode for the above problem:
Explanation:
Declare weeks and days As Variables
Output: "Enter the input for weeks are left until Christmas."
Set weeks = user answer
Set days = weeks *7
Output: “The days left until Christmas is ”
Output: days.
Output:
If the user inputs 2 then the output is "The days left until Christmas is 14"
If the user inputs 3 then the output is "The days left until Christmas is 21"
Pseudocode Explanation:
Pseudocode is the solution to any problem which is written in the form of the English language.
The only difference between the algorithm and Pseudocode is that the algorithm is only written in English and the Pseudocode is written in the form of input and output.