🔖 Background Information

N/A

🎯 Problem Statement

Write a program that asks the user for an integer greater than zero. Then, it should return a few values:

  1. The sum of all of the integers from one to the given integer.
  2. The product of all of the integers from one to the given integer.
  3. The average of all of the integers from one to the given integer.

✅ Acceptance Criteria

Your program should…

  • Prompt the user for an integer value greater than zero.
  • Print out the calculations listed in the problem statement.

📋 Dev Notes

  • You do not need to worry about validating the input in any way. You can assume that the user will always enter a valid integer.

🖥️ Example Output

./n.out
 
What is your selected number?  4
 
The sum from 1 to 4 is 10
The product from 1 to 4 is 24
The average from 1 to 4 is 2.5

📘 Works Cited

N/A