Itp Lab-02
Itp Lab-02
LAB - 2
IIIT Raichur Time : 6:00 pm - 7:30 pm
Write a program that calculates the average of a set of numbers input by the user. The user
should be able to input as many numbers as desired, and the program should continue until
the user decides to stop.
Sample Output:
Input numbers to calculate the average(should be in floating point value) (enter a non-numeric value
to stop):
Input a number: 3
Input a number: 1
Input a number: 12
Input a number: -12
Input a number: 6
Input a number: a
Average of input numbers: 2.00
Sample Input:
n=5
Sample Output:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1