inital commit, adding all school projects
This commit is contained in:
25
Kinosaalreservierung/main.cpp
Normal file
25
Kinosaalreservierung/main.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int sitze[10] = {0,0,0,0,0,0,0,0,0};
|
||||
bool gefunden = false;
|
||||
|
||||
int main() {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
cout << fixed << setprecision(2);
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (sitze[i] == 0 && sitze[i+1] == 0) {
|
||||
gefunden = true;
|
||||
cout << "Plätze gefunden bei Nummer " << i << " und Nummer " << i+1 << endl;
|
||||
}
|
||||
}
|
||||
if (!gefunden) {
|
||||
cout << "Leider keinen freien platz gefunden" << endl;
|
||||
}
|
||||
system("Pause");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user