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.
Revision 2:4ae311ea8ffd, committed 2020-04-22
- Comitter:
- riad
- Date:
- Wed Apr 22 14:40:17 2020 +0000
- Parent:
- 1:06268b87b276
- Commit message:
- #264 Aufgabe
Changed in this revision
| Bajraktarevic_3_264_Zinseszins_Berechnen.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Bajraktarevic_3_264_Zinseszins_Berechnen.cpp Wed Apr 22 14:40:17 2020 +0000
@@ -0,0 +1,26 @@
+/*#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;
+}