Showing posts with label Minutes and Seconds Converter Pseudocode and Flowchart. Show all posts
Showing posts with label Minutes and Seconds Converter Pseudocode and Flowchart. Show all posts

Thursday, October 10, 2019

Seconds to Hours, Minutes and Seconds Converter Pseudocode and Flowchart

Programming Problem

Write pseudocode and flowchart to convert a given integer (in seconds) to hours, minutes and seconds.


Pseudocode

Start
    Declare Integer sec, h, m, s
     Output "Seconds to Hours, Minutes and Seconds Converter"
    Output "Give value in seconds"
    Input sec
    Assign h = (sec/3600)
    Assign m = (sec -(3600*h))/60
    Assign s = (sec -(3600*h)-(m*60))
    Output "The equivalent is " & h & " Hour " & m & " Minutes " &  s &" Seconds."
Stop



Flowchart  of Seconds to Hours, Minutes and Seconds Converter