inital commit, adding all school projects
This commit is contained in:
22
quadrat/main.cpp
Normal file
22
quadrat/main.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace std;
|
||||
|
||||
float quadrat(float iSeitenlaenge) {
|
||||
return iSeitenlaenge * iSeitenlaenge;
|
||||
}
|
||||
|
||||
int main() {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
cout << fixed << setprecision(2);
|
||||
|
||||
float fSeitenlaenge;
|
||||
|
||||
cout << "Wie lange ist eine Seite? \n";
|
||||
cin >> fSeitenlaenge;
|
||||
|
||||
cout << endl << "Das ergebnis ist: " << quadrat(fSeitenlaenge);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user