mirror of
https://github.com/Kaehvaman/OAIP.git
synced 2025-01-18 08:39:11 +04:00
25 lines
375 B
C
25 lines
375 B
C
#include <stdio.h>
|
|
#include <Windows.h>
|
|
|
|
int main()
|
|
{
|
|
SetConsoleCP(1251);
|
|
SetConsoleOutputCP(1251);
|
|
|
|
int sum, year;
|
|
float percent;
|
|
printf("sum = ");
|
|
scanf("%d", &sum);
|
|
printf("percent = ");
|
|
scanf("%f", &percent);
|
|
|
|
year = 0;
|
|
do {
|
|
printf("%d RUB in %d year\n", sum, year);
|
|
sum = (sum * (100 + percent)) / 100;
|
|
year += 1;
|
|
} while (year <= 10);
|
|
|
|
return 0;
|
|
}
|