Advertisement
MaciekxD

Untitled

Mar 6th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int wklad=100;
  6.  
  7. double dafne=100;
  8. int rok=1;
  9. double b=10;
  10.  
  11.  
  12. double cleo=100;
  13. double c=1.05;
  14.  
  15. double d=0;
  16.  
  17. do {
  18.  
  19. for (int i = 0; i < rok; i++) {
  20.  
  21. dafne = wklad + (b * rok);
  22.  
  23. }
  24.  
  25. for (int i = 0; i < rok; i++) {
  26. cleo = cleo * c;
  27.  
  28.  
  29. }
  30. rok++;
  31. }
  32. while(cleo>dafne);
  33. cout << "Zarobki Dafne: " << dafne;
  34.  
  35. cout << endl;
  36.  
  37. cout << "zarobki Cleo: " << cleo;
  38. cout << endl;
  39.  
  40. cout << rok;
  41.  
  42. cout<<rok;
  43. return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement