6.2k views
2 votes
write a program to calculate and display the sum and average of three integers. note that the sum should be an integer value and the average should be a real value. the following is a sample run:

User Foslock
by
7.5k points

1 Answer

2 votes

Final answer:

In a programming language such as Python, you can create a program to compute and show the sum and average of three integers.

Step-by-step explanation:

To calculate and display the sum and average of three integers, you can write a program in a programming language like Python. Here is an example:

# Prompt the user to enter three integers
num1 = int(input('Enter first integer: '))
num2 = int(input('Enter second integer: '))
num3 = int(input('Enter third integer: '))

# Calculate the sum
sum = num1 + num2 + num3

# Calculate the average
avg = sum / 3

# Display the sum and average
print('Sum:', sum)
print('Average:', avg)

User Vsasv
by
7.9k points