Week 7 Homework

Week 7 Homework - /Get the length of side A Display...

This preview shows pages 1–2. Sign up to view the full content.

Week 7 Homework Multiple Choice 1. B 2. D 3. A 4. C 5. D 6. B 7. C 8. B 9. A 10. A Algorithm Workbench 1. Declare Integer rand Set number= random(1,100) Display number Program Output 23 2. Function Integer half (num) Declare Integer result Set result= num(half) Return result End Function 4. Function Integer timesTen, num1 Declare Integer result

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Set timesTen= num1 * 10 Return value End Function Programming Exercise 1. //Variable declarations Declare Real a, b, c
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //Get the length of side A. Display “Enter the length of side A.” Input a //Get the width of side B. Display “Enter the width of side B.” Input b //Calculate the area of the rectangle. Set c= a * b //Display the area of the rectangle. Display “The area of the rectangle is “, c 4. Function Integer max (8<15) Declare Integer result Set max= 8<15 Return max End Function 7....
View Full Document

{[ snackBarMessage ]}

Page1 / 2

Week 7 Homework - /Get the length of side A Display...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online