Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int colchao[3], porta[2];
- scanf("%d %d %d %d %d", &colchao[0], &colchao[1], &colchao[2], &porta[0], &porta[1]);
- int i, j;
- for(i = 0; i < 3; i++)
- for(j = 0; j < 3; j++)
- if(colchao[i] > colchao[i+1] && (i+1) < 3) {
- int aux = colchao[i];
- colchao[i] = colchao[i+1];
- colchao[i+1] = aux;
- i = 0;
- }
- if(porta[0] > porta[1]) {
- int aux = porta[0];
- porta[0] = porta[1];
- porta[1] = aux;
- }
- if(porta[0] >= colchao[0] && porta[1] >= colchao[1])
- printf("S");
- else
- printf("N");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement