Mrs. Jessy teaches her 7-year-old daughter to tell the day of a week when jessy tells a number between 1 to 7. Implement this scenario and generate an algorithm for the same.
Answers
Answered by
2
Answer:
Start of algorithm
Take variable x as input numbers from 1 to 7.
Take variable y as output days that is Sunday, Monday, Tuesday, Wednesday, Thursday, Friday and Saturday.
Take an input to let the user chose the number that needs to show respective output.
If user chooses x=1, then show output y=Sunday
If user chooses x=2, then show output y=Monday
If user chooses x=3, then show output y=Tuesday
If user chooses x=4, then show output y=Wednesday
If user chooses x=5, then show output y=Thursday
If user chooses x=6, then show output y=Friday
If user chooses x=7, then show output y=Saturday
Print the output after carrying out the input according to the users choice.
End of algorithm
Explanation:
Similar questions