Created
September 18, 2020 13:37
-
-
Save anirul/3d64751281b04ca2cc4e1d0a354c0c25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main () | |
{ | |
std::cout << " Roll your dice between 1 and 8 to beat Boss\n"; | |
int pvFinaux = 100; | |
int value = 0 ; | |
std::cin >> value; | |
int attaque = 6; | |
int defense = 30; | |
int attaqueFinale = attaque * value; | |
bool exit = false; | |
while ( !exit ) | |
{ | |
if (attaqueFinale > defense) | |
{ | |
std::cout << "B perd des pv\n"; | |
pvFinaux = pvFinaux- (attaqueFinale - defense ); | |
} | |
else | |
{ | |
std::cout << "Esquive\n"; | |
} | |
std::cout << pvFinaux << std::endl; | |
if (pvFinaux <= 0) | |
{ | |
break; | |
} | |
system("pause"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment