main() {
double biggest = returnBiggest();
cout << "The biggest one is:" << biggest << endl;
return 0;
}
double returnBiggest() {
double aBiggest;
double cValue;
cout << "Please, insert first value: ";
if (!(cin >> aBiggest)) {
cout << "At least one value is needed" << endl;
exit(1);
}
cout << endl;
cout << "Please, insert value (insert any other character for finish program): ";
while (cin >> cValue) {
if (cValue > aBiggest)
aBiggest = cValue;
cout << endl;
cout << "Please, insert value (insert any other character for finish program): ";
}
return aBiggest;
}
Pastebin: https://pastebin.com/HFGMa9wU
It looks like you posted long piece of code, consider editing it out and putting it on hastebin.com and pasting link to it instead. Alternatively, send your code in a file.
Обсуждают сегодня