Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
Created May 25, 2017 14:50
Show Gist options
  • Save rogerioagjr/b515da6e17686cf61af803e2954d768a to your computer and use it in GitHub Desktop.
Save rogerioagjr/b515da6e17686cf61af803e2954d768a to your computer and use it in GitHub Desktop.
Bondinho
// Bondinho - F1PJ - OBI 2017
// Rogério Júnior
// Complexidade: O(1)
#include <cstdio> // scanf e printf
int main(){
// declaro e leio os valores de A e M
int a, m;
scanf("%d %d", &a, &m);
// se a soma de A e M não suerar 50
if(a+m<=50){
printf("S\n"); // imprimo o caractere 'S'
}
// caso o contrário ocorra
else{
printf("N\n"); // imprimo o caractere 'N'
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment