Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<clocale>
- using namespace std;
- int main()
- {
- setlocale(LC_CTYPE , "rus");
- int daysInYear = 365;
- int amountMonth = 0;
- int daysInMonth = 31;
- float sumDepozit = 0;
- float prozentnastavka = 0.05;
- float profit = 0;
- float a1 = 0 , a2 = 0;
- cout<<"Введите вашу сумму депозита"<< endl;
- cin>> sumDepozit;
- cout<<"ВВедите количество месяцев"<< endl;
- cin>> amountMonth;
- a1 = sumDepozit * (prozentnastavka);
- a2 = daysInYear * daysInMonth;
- cout<<"Прибыль депозита за месяц : ";
- profit = (a1 / a2);
- cout<< profit << "$\n" ;
- cout<< "За весь срок " <<endl;
- cout<< amountMonth << " * " << profit << " = "<< profit * amountMonth << "$\n" ;
- cout<<"Общая сумма к выплате в конце срока " ;
- cout<< sumDepozit * profit << "$\n" ;
- cout<< endl << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement