Server IP : 172.16.15.8 / Your IP : 3.144.122.20 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/rsjohnson/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// Author: Robert Johnson // This program will calculate the value of // four test scores and drop the lowest. #include <iostream> #include <iomanip> using namespace std; //Function Prototype void getValues(); void findLowest(); void calcAverage(); int main() { void getValues() { int score1, score2, score3, score4; cout << "Enter in 4 test scores and I will store "; cout << "them in variables. "; cin >> score1 >> score2 >> score3 >> score4; cout << fixed << showpoint << setprecision(2); } void findLowest() { int array[4]; array[0] = score1; array[1] = score2; array[2] = score3; array[3] = score4; int lowest=999999; for(int i=0; i<4; i++) } if(array[i] < lowest) lowest = array[i]; cout << "The lowest is: " << lowest << endl; return 0; }