0% found this document useful (0 votes)
15 views2 pages

Pseudocode Exercise

The document outlines pseudocode for various exercises including multiplying numbers, calculating resistance, checking for negative numbers, calculating change from a banknote, summing positive numbers, determining student pass/fail grades, and calculating gross pay. Each exercise follows a structured format with steps for input, processing, and output. The pseudocode serves as a guide for implementing these basic programming tasks.

Uploaded by

harinisara16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Pseudocode Exercise

The document outlines pseudocode for various exercises including multiplying numbers, calculating resistance, checking for negative numbers, calculating change from a banknote, summing positive numbers, determining student pass/fail grades, and calculating gross pay. Each exercise follows a structured format with steps for input, processing, and output. The pseudocode serves as a guide for implementing these basic programming tasks.

Uploaded by

harinisara16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Pseudocode exercise

1. Multiplying two numbers


I. Start
II. Get number1, number2
III. Calculate result = number1 * number2
IV. Display result
V. End

2. Calculating resistance
I. Start
II. Get voltage(V), current(I)
III. Calculate resistance = V/I
IV. Display resistance
V. End

3. Check if a number is negative


I. Start
II. Get number
III. If number < 0, Display “Negative number”
IV. End

4. Calculate change from a given banknote


I. Start
II. Get price, banknote
III. If banknote >= price
Calculate change = banknote – price
Display change
Else
Display “Insufficient amount paid”
IV. End

5. Sum two positive numbers


I. Start
II. Get number1, number2
III. If number 1 > 0 and number 2 > 0
Calculate sum = number1 + number2
Display sum
Else
Display “Both numbers must be positive”
IV. End

6. Student grade pass/fail


I. Start
II. Get student grade
III. If student grade >= 60, Display “Passed”
Else, Display “Failed”
IV. End

7. Calculating gross pay

You might also like