Asked by Jen
I was wondering if anyone would be able to help me with the following pseudocode so that it looks good to turn in. Any changes would be helpful.
Completing Homework
Main Module
Declare FindReading As Real
Declare ReadReading AS Real
Declare CompleteAssignment As Real
Declare Pages as Integer
Declare outputPrompt As Real
Get user input
Find assigned reading
Read reading
Complete assignment
End Main Module
Input Data Module
Write "What is the reading for the week?"
Input reading
Write "How many pages is the reading?"
Input pages
Write "How long did it take to complete the reading?"
Input hours, minutes
Write "How long did it take to complete the assignment?"
Input hours, minutes
End Input Data Module
Find Total Hours Module
Declare hours as real
Declare minutes as real
Hours = 1*hours
Minutes = 60/minutes
TotalHours = hours + minutes
That is as far as I have gotten and I need to know if what I have is correct or are there things that I should had added or taken away.
Thanks for the help.
Completing Homework
Main Module
Declare FindReading As Real
Declare ReadReading AS Real
Declare CompleteAssignment As Real
Declare Pages as Integer
Declare outputPrompt As Real
Get user input
Find assigned reading
Read reading
Complete assignment
End Main Module
Input Data Module
Write "What is the reading for the week?"
Input reading
Write "How many pages is the reading?"
Input pages
Write "How long did it take to complete the reading?"
Input hours, minutes
Write "How long did it take to complete the assignment?"
Input hours, minutes
End Input Data Module
Find Total Hours Module
Declare hours as real
Declare minutes as real
Hours = 1*hours
Minutes = 60/minutes
TotalHours = hours + minutes
That is as far as I have gotten and I need to know if what I have is correct or are there things that I should had added or taken away.
Thanks for the help.
Answers
Answered by
Nick
I believe you would have to convert the hours to minutes than add the two:
Input Reading Time Hours
Input Readig Time Minutes
Input Assignment Time Hours
Input Assignment Time Minutes
ReadingTime = (hours * 60) + minutes
AssignmentTime = (hours * 60) + minutes
Total Time = (ReadingTime + AssignmentTime)
Input Reading Time Hours
Input Readig Time Minutes
Input Assignment Time Hours
Input Assignment Time Minutes
ReadingTime = (hours * 60) + minutes
AssignmentTime = (hours * 60) + minutes
Total Time = (ReadingTime + AssignmentTime)
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.