CS Project

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Pseudocode:

INPUT: countryname

INPUT: H,M

IF counrtyname ‘’JAPAN’’

H H-3

M M+0

ELSEIF counrtyname ‘’USA’’

H H+5

M M+30

ELSEIF counrtyname ‘’NZ’’

H H+11

M M+0

ELSE: PRINT ‘’ ERROR’’

ENDIF

PRINT ‘’The country name is’’, countryname

PRINT ‘’The hours and the minutes are’’, H,M


Start

Input:

CN

Input:

H,M

Yes H=H-3
CN=JP M=M+0

No

Yes
H=H+5
CN=USA
M=M+30

No

Yes
H=H+11
CN=NZ M=M+0

OUTPUT:
End
‘’Error’’
Explanation:

It’s a program which inputs the country name and calculates it time relative the time in KSA.

I used constant like ‘’JAPAN,USA,NZ’’ and variables like ‘’H,M’’

I inputted the country name and the algorithm gave me the time.

You might also like