Uploaded by Demo Page

Activity 3 Pseudocode

advertisement
Activity 3 Pseudocode
1. Develop a program that will allow the user to enter three
numbers and display the average
Algorithm
step 1 ask the three numbers from the user
step 2 add the three numbers
step 3 divide the number by three
step 4 display the average
Pseudocode
Step 1 INPUT N1, N2,N3
STEP 2 SUM<-N1+N2+N3
STEP 3 DIVIDE =SUM/3
STEP 4 OUTPUT DIVIDE
2.Develop a program that will ask two numbers and
display the sum,difference ,product and quotient
step 1 ask the two numbers from the user
step 2 add the two numbers
step 3 display the sum
step 4 subtract the two numbers
Step 5 display the difference
Step 6 multiply the two numbers
Step 7 display the product
Step 8 divide the numbers
Step 9 display the quotient
Pseudocode
Step 1 INPUT N1, N2
STEP 2 SUM<-N1+N2
STEP 4 Difference <-N1-N2
Step 5 Product<- N1*N2
Step 6 Quotient< -N1/n2
Step 7 OUTPUT <-SUM,DIFFERENCE,PRODUCT,QUOTIENT
Download