Created
June 8, 2015 21:34
-
-
Save rogerioagjr/0646b533501f6ef09837 to your computer and use it in GitHub Desktop.
Cobra Coral
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
// Cobra Coral - F1P2 - OBI 2015 | |
// Rogério Júnior | |
// Complexidade: O(1) | |
#include <cstdio> | |
int main(){ | |
// declaro e leio os números da sequência | |
int a, b, c, d; | |
scanf("%d %d %d %d", &a, &b, &c, &d); | |
// se o primeiro for igual ao último | |
if(a==d) printf("F\n"); // então é uma coral falsa | |
// caso contrário, é uma coral verdadeira | |
else printf("V\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment