Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float x = 15;
- int l;
- cout<<"Lvl: ";
- cin >> l;
- cin.ignore();
- for ( int i = 1; i < l-1; i++) {
- x = x * 1.2;
- x -= (int)x % 1;
- }
- cout<< x <<endl;
- cin.get();
- }
Add Comment
Please, Sign In to add comment