ass 2 itp

.doc

School

Northern Virginia Community College *

*We aren’t endorsed by this school

Course

100

Subject

Computer Science

Date

Nov 24, 2024

Type

doc

Pages

5

Uploaded by Robemaru4

Report
ITP 100 - Designing and desk-checking algorithms 5 A Defining diagram Input Processing Output Prompt for hours, minutes1 12-hour time hours minutes Get hours, minutes Calculate 12-hour time Print 12-hour time B Solution algorithm Convert_24hour_time 1 Prompt for hours, minutes 2 Get hours, minutes 3 DOWHILE (hours, minutes) NOT = 9999 4 IF hours > 12 THEN hours = hours – 12 time = ‘p.m.’ ELSE time = ‘a.m.’ ENDIF 5 Display hours, ‘.’, minutes, time 6 Prompt for hours, minutes 7 Get hours, minutes ENDDO END C Desk checking
i Input data: First data set Second data set Third data set Hours, minutes 1020 2224 9999 ii Expected results: First data set Second data set Third data set 12-hour time 10.20a.m. 9.23p.m
iii Desk check table: Statement Hours Minutes Time 12-hour time DOWHIL First time Get 10 20 DOWHILE True IF a.m. Second time Get 22 24 DOWHILE True IF 10 p.m. Display 10.24p.m. Get 99 99 DOWHILE False ITP 100 - Designing and desk-checking algorithms 6 A Defining diagram Input Processing Output customer_no Name address Postcode Total_amt_owing Read Customer Record Calculate Min_amt_due Print Min_amt_due Customer_no Name address Postcode Total_amt_owing
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help