Last active
March 28, 2018 23:05
-
-
Save diogommartins/0f5962f18da53cc7bbe1c29be709032c 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<locale.h> | |
#include<stdio.h> | |
void main () | |
{ | |
// Cidade Quilometro | |
// Rio 9 | |
// Minas 7 | |
// Espirito Santo 6 | |
// São Paulo 12 | |
char destino[2]; | |
int quilometros = 0; | |
printf("Digite o destino (RJ, SP, MG, ES) \n"); | |
scanf("%s", destino); | |
if (strcmp(destino, "RJ") == 0){ | |
quilometros = 6; | |
} | |
else if (strcmp(destino, "SP") == 0){ | |
quilometros = 12; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment