//Written by Mo Kashi //This program reads an input file containing integers,analyze //them and gives the following information: //-The total number of positive numbers read in //-The total number of negative numbers read in //-The smallest number read in //-The largest number read in //-The average of negative numbers //-The average of positive numbers //-The average of all numbers #include #include ofstream fout; int freeze; void Banner(){//This method prompts user to print out //the banner of the student cout<>number; while(fin){ total_numbers++; sum_all+=number; if(number>largest_number) largest_number=number; if(number0){ total_positives++; sum_positives+=number; }//if if(number<0){ total_negatives++; sum_negatives+=number; }//if fin>>number; }//while fin.close(); average_positives=(double) sum_positives/total_positives; average_negatives=(double)sum_negatives/total_negatives; average_all=(double)sum_all/total_numbers; fout.open("c:\\output.txt"); Banner(); cout<<"Total number of positive numbers read in: "; cout<>freeze; }//main()