Created
November 15, 2016 16:39
-
-
Save netmask/0b85af7b025a6627d3a967cc68eff9d4 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 <stdio.h> | |
#include <ctype.h> | |
#include <memory.h> | |
int main() { | |
char marca[10]; | |
printf("tt Mejor Carro De Marcas Mostradas En Ejemplo \n"); | |
printf("ttnn Ingresa Cualquier Marca De Carro Que Aparece Abajo \n"); | |
printf("ttn ****Ej: Dodge, Chevrolet, Ford, Nissan**** \n"); | |
scanf("%s", marca); | |
//minusculas | |
for(int i = 0; marca[i]; i++){ | |
marca[i] = tolower(marca[i]); | |
} | |
if (strncmp(marca,"dodge", 10)) { | |
printf("El Mejor Carro De Dodge Es El Challenger Hellcat V8 2016 con 703HP"); | |
} else if (strncmp(marca, "nissan", 10)) { | |
printf("El Mejor Carro De Nissan Es El 370Z 2017 V6 con 332Hp"); | |
} else if (strncmp(marca, "chevrolet", 10)) { | |
printf("El Mejor Carro De Chevrolet Es El Corvette Z06 2016 V8 con 650HP"); | |
} else if (strncmp(marca,"ford",10)) { | |
printf("El Mejor Carro De Ford Es El Shelby GT350 V8 con 526Hp"); | |
} else { | |
printf("Esa Marca De Carro No Existe"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment