Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #include<iostream>
  2. #include<clocale>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. setlocale(LC_CTYPE , "rus");
  9.  
  10. int daysInYear = 365;
  11. int amountMonth = 0;
  12. int daysInMonth = 31;
  13. float sumDepozit = 0;
  14. float prozentnastavka = 0.05;
  15. float profit = 0;
  16.  
  17. float a1 = 0 , a2 = 0;
  18.  
  19. cout<<"Введите вашу сумму депозита"<< endl;
  20. cin>> sumDepozit;
  21.  
  22. cout<<"ВВедите количество месяцев"<< endl;
  23. cin>> amountMonth;
  24.  
  25. a1 = sumDepozit * (prozentnastavka);
  26. a2 = daysInYear * daysInMonth;
  27.  
  28. cout<<"Прибыль депозита за месяц : ";
  29. profit = (a1 / a2);
  30. cout<< profit << "$\n" ;
  31.  
  32. cout<< "За весь срок " <<endl;
  33. cout<< amountMonth << " * " << profit << " = "<< profit * amountMonth << "$\n" ;
  34.  
  35. cout<<"Общая сумма к выплате в конце срока " ;
  36. cout<< sumDepozit * profit << "$\n" ;
  37.  
  38. cout<< endl << endl;
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement