Created
May 25, 2015 06:12
-
-
Save rogerioagjr/85f3c44aeb4189f5d519 to your computer and use it in GitHub Desktop.
Competição de Chocolate
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 <cstdio> | |
int n, m; | |
int main(){ | |
// leio os valores de n e m | |
scanf("%d %d", &n, &m); | |
// se n for múltiplo de m+1, Carlos ganha | |
if(n%(m+1)==0) printf("Carlos\n"); | |
// Caso contrário, Paula ganha | |
else printf("Paula\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment