Last active
July 14, 2020 23:43
-
-
Save anitainfo/ee04c28e2a06c86233344f51b72438c8 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<bits/stdc++.h> //biblioteca utilizada | |
using namespace std; | |
int main() | |
{ | |
int A,B,C; //declaração das variáveis | |
scanf("%d %d %d", &A, &B, &C); //leitura da entrada | |
if(A==B && B==C) //se 'A'='B'='C' | |
{ | |
printf("3"); //imprimi 3 | |
return 0; //retorna a 0 (encerra) | |
} | |
if((A<B && B<C) || (A==B & A+B<C)) //se ('A'<'B'<'C') OU ('A'='B' && 'A'+'B'<'C') | |
{ | |
printf("1"); //imprimi 1 | |
return 0; //retorna a 0 (encerra) | |
} | |
printf("2"); //se nada é verdade, imprimi 2 | |
return 0; //retorna a 0 (encerra); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment