inital commit, adding all school projects
This commit is contained in:
27
ReichRechner/main.cpp
Normal file
27
ReichRechner/main.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <windows.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
|
||||
float fAnlage, fZinssatz,fEndgeld = 0;
|
||||
int iJahre = 0;
|
||||
|
||||
cout << "wie viel geld hast du? ";
|
||||
cin >> fAnlage;
|
||||
|
||||
cout << "Wie viel zinssatz? ";
|
||||
cin >> fZinssatz;
|
||||
|
||||
fEndgeld = fAnlage;
|
||||
do
|
||||
{
|
||||
fEndgeld += fEndgeld * (fZinssatz/100);
|
||||
iJahre += 1;
|
||||
} while (fEndgeld < 1000000);
|
||||
|
||||
cout << iJahre;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user