You are on page 1of 8

INPUT OUTPU PROCESSING

T
Number area Multiply base and height
1(height)
Number 2(base)
PROBLEM: Find the area of rectangle

STEP 1: DEFINE THE PROBLEM

STEP 2: DESIGN THE SOLUTION

START

READ number1(HEIGHT),
number2(BASE)

Area = number1(base) *number2 (height)

DISPLAY area

STOP
INPUT OUTPUT PROCESSING
Number cube Multiply the number to itself, twice
1
PROBLEM: Find the cube of a number

STEP 1: DEFINE THE PROBLEM

STEP 2: DESIGN THE SOLUTION

START

READ number1

Cube = number1*number1*number1

DISPLAY cube

STOP
STEP 1: DEFINE THE PROBLEM

INPUT OUTPUT PROCESSING


Number 1(marks obtained) Quotient Divide number 1 to number 2
Number 2(total marks) Marks percentage Multiply by 100
PROBLEM: Find the percentage

STEP 2: DESIGN THE SOLUTION

START

READ number1,number 2

Quotient =number 1(marks obtained)/number 2total


marks)

Marks Percentage= quotient * 100

DISPLAY marks percentage

STOP
STEP 1: DEFINE THE PROBLEM

INPUT OUTPUT PROCESSING


Number 1(tax percent) Sales Divide tax percent by 100
tax
Number 2(amount Multiply by quotient
PROBLEM: Calculate sales tax

STEP 2: DESIGN THE SOLUTION

START

READ number1

Quotient= tax percent/100

Sales Tax= amount*quotient

DISPLAY Sales tax

STOP
STEP 1: DEFINE THE PROBLEM

INPUT OUTPUT PROCESSING


Number 1 (number of Number of minutes Divide tax percent by 100
year)
Number of seconds Multiply by quotient
PROBLEM: Find the number of minutes and seconds in a year

STEP 2: DESIGN THE SOLUTION

START

READ number1

Mins= hr*60;

Secs = min*60;

DISPLAY sec

DISPLAY min
STOP

START

READ number1

YES NO
If number1 <
0

DISPLAY “negative
DISPLAY “Positive number”
number”

STOP
START

READ number1,number2

Number
YES 1==number2
NO

DISPLAY “two numbers


are not equal”
DISPLAY “two numbers
are equal”

STOP
STOP
START

READ number1,number2

Difference= number1-number2

Difference > 0
NO
YES

STOP

DISPLAY product

STOP

You might also like