Yesterday, 06:58 PM
(This post was last modified: Yesterday, 07:01 PM by Kernelpanic.)
@a740g & RhoSigma - Yes, it is not in my books yet. Otherwise, in C++ it works like in QB64 with three numbers:
Basic & C++ rulez!
Basic & C++ rulez!
Code: (Select All)
//max example - https://legacy.cplusplus.com/reference/algorithm/max/
//Beispiel in C++ zu QB64 MAX/MIN - 19. Dez. 2024
#include <iostream> // std::cout
#include <algorithm> // std::max
#include <iomanip> //setw() und cin.width(int)
#include <string>
using namespace std;
int main(void)
{
double a, b, c, maximum;
system("cls");
cout << '\n' << "Maximum dreier Zahlen" << '\n' << '\n';
cout << "Zahl 1: "; cin >> a;
cout << "Zahl 2: "; cin >> b;
cout << "Zahl 3: "; cin >> c;
maximum = max(max(a, b), c);
cout << '\n' << "Die groesste Zahl ist: ";
cout << fixed << setprecision(2) << setw(4) << maximum << '\n';
cout << endl;
return 0;
}