Advertisements
Advertisements
प्रश्न
Write a program to find the average of three numbers.
थोडक्यात उत्तर
Advertisements
उत्तर
Program:
#defining three variables
a = 5
b = 6
c = 7
#calculating average using the formula, average = (sum of variables)/(number of variables)
average = (a + b + c)/3
#print the result
print("The average of",a,b,"and",c,"is",average)
OUTPUT:
The average of 5 6 and 7 is 6.0shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
