//* Looking for the MAX value *

#include <stdlib.h> int main() { int cnt; double max; // remember to initialize! int i; printf("Please enter the number of data items "); scanf("%d", &cnt); // read number of numbers printf("Please enter the data one by one:\n"); scanf("%lf", &max); // see class notes for explanation for (i=2; i<=cnt; i++) { double x; scanf("%lf", &x); // read next number available if (x>max) max=x; } printf("The maxiumum number is %lf\n", max); return(0); }