Skip to content

Instantly share code, notes, and snippets.

@anitainfo
Last active July 14, 2020 23:43
Show Gist options
  • Save anitainfo/ee04c28e2a06c86233344f51b72438c8 to your computer and use it in GitHub Desktop.
Save anitainfo/ee04c28e2a06c86233344f51b72438c8 to your computer and use it in GitHub Desktop.
#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