Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Bajraktarevic_3_264_Zinseszins_Berechnen.cpp
- Committer:
- riad
- Date:
- 2020-04-22
- Revision:
- 2:4ae311ea8ffd
File content as of revision 2:4ae311ea8ffd:
/*#264 Mit Zinseszins berechnen
Anfänger - C++von DragStar - 23.03.2020 um 09:39 Uhr
Am Anfang eines Jahres werden 1000 Euro auf ein Sparkonto eingezahlt.
Wie viele Jahre dauert es, bis bei einem Zinssatz von 2 Prozent daraus mindestens 3000 Euro geworden sind?
Das Startkapital und der Zinssatz sollen vom Benutzer eingegeben werden können.*/
/*__________________________________________________________________________________*/
#include <stdio.h>
int main()
{
float Geld, Zinssatz;
int jahre;
printf("Geben Sie Ihren Startbetrag ein: " );
scanf("%f", &Geld);
printf("Geben Sie den Zinssatz ein: " );
scanf("%f", &Zinssatz);
printf("\n" );
for(jahre = 1; jahre <= 2; jahre=jahre+1)
{
Geld = Geld + Geld * (Zinssatz/100);
printf("%s %i %s %f\n", "Nach", jahre, "Jahren haben Sie folgende Summe:", Geld);
}
return 0;
}