#include #include #include #include #include #include int main() { std::string input; unsigned short amount = 1; std::cout << "Gib die Anzahl der Zahlen ein: "; getline(std::cin, input); std::stringstream(input) >> amount; long double array[amount]; std::cout << "\nM\x94 \bchtest du mit zuf\x84lligen Zahlen arbeiten? y/n "; getline(std::cin, input); if(input == "y" || input == "Y") { srand(time(0)); for(unsigned short idx = 0; idx < amount; idx++) { array[idx] = rand()%100; } } else { for(unsigned short idx = 0; idx < amount; idx++) { std::cout << "Gib die " << idx+1 << ". Zahl ein: "; getline(std::cin,input); std::stringstream(input) >> array[idx]; } } std::cout << "\n"; for(unsigned short idx =0; idx