-
Notifications
You must be signed in to change notification settings - Fork 0
/
caractervoc.c
41 lines (26 loc) · 990 Bytes
/
caractervoc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Universidad Sergio Arboleda
// Arquitectura de Computadores
// Taller Parcial 2
// Samuel Medina y Rober Burgos
// Profesor: Jhon Corredor
// Seccion 2: Caracter vocal o consonante.
// El presente ejercicio debe imprimir si el caracter ingresado por el usuario es una vocal o una consonante.
#include <stdio.h>
int main(){
//Se crea la variable para el programa
char LetraA;
//Se le pide al usuario los datos para la ejecucion del programa
printf("Bienvenido \n \n");
printf("Ingrese una letra para saber si es vocal o consonante: \n");
scanf("%s", &LetraA);
//Se crean las operaciones y ademas se imprime la respuesta o el error
if(LetraA == 'a' || LetraA == 'e' || LetraA == 'i' || LetraA == 'o' || LetraA == 'u' ){
printf("La letra ingresada es una voval \n");
}
else{
printf("La letra ingresada es consonante \n");
}
printf(" \n \n Gracias por utilizar el programa. \n \n");
//Finaliza el programa
return 0;
}