C Program to determine the Range and Average of the values entered by the user(to terminate enter -1).
C Program to determine the Range and Average of the values entered by the user(to terminate enter -1). This is a program to calculate the range and average of the values entered by the user and to terminate it by entering -1 and it will determine the highest-value, lowest-value, range, average and also it will count the number of values entered by the user. PROGRAM: #include <stdio.h> #include <math.h> int main () { int count = 0 ; float value , high , low , average , range , sum = 0 ; printf ( "Enter the values (to terminate enter -1) : \n " ); while ( 1 ) { scanf ( "%f" ,& value ); if ( value !=- 1 ) { ...
Comments