Computer Science, asked by saitejagoud688, 4 months ago

to find the sum and average of any 5 given number​

Answers

Answered by iTzRiYaNsH
5

Answer:

// Program to calculate average of 5 numbers entered by users.

int main()

{

int num; // Declare 'num' to read number from users.

int sum, i; // Declare variables 'sum' to keep sum of numbers & 'i' used in for loop.

float average; // Declae variable 'average' of float type to save average value.

Answered by allysia
0

Answer:

A python code goes like:

___________________________

sum=0

for i in range(5):

   n=int(input("Enter a number: "))

   sum+=n

print("The average will be: ", sum/5)

___________________________

Similar questions