Tuesday, 28 February 2012

Proper Naming and Semantics - Practice Questions

Question 1:

Write a program that will find the average of 5 numbers, which are inputted by the user.

Question 2:

Write a program that will find the product of 3 numbers.

Question 3:

Write a program that reads in 5 numbers. It adds up the first 4 numbers and then divides that number by the 5th number.

Question 4:

Write a program that reads in 4 numbers. You subtract the first number by the second number, and multiply the third and the forth number. Now you will do: (first number subtracted by secondNumber) and divide that by (third number multiplied by forth number)

The answers will be posted inside a different post to avoid distractions.

No comments:

Post a Comment