-
Notifications
You must be signed in to change notification settings - Fork 1
/
10.c
36 lines (26 loc) · 832 Bytes
/
10.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
/*
10 - Programa que pida 3 numeros
y al final imprima los numeros
del 1 al 15 menos los numeros capturados
*/
#include <stdio.h>
int main(){
int i, a, b, c; // variables
// Solicitamos al usuario ingresar 3 numero enteros entre 1 & 15
printf("Ingrese 3 No. entre 1 & 15 \n\n");
// alojamos los numeros ingresados en las variables
scanf("%d %d %d", &a, &b, &c);
printf("No. 1 al 15 menos los numeros capturados \n");
// For loop para imprimir los numero hasta 15
for (i = 1; i <= 15; i++) {
// Condicional para excluir los numero capturados
if(i == a || i == b || i == c){
continue; // excluimos los numeros capturados
}
else{
// Imprimimos los numero restantes entre 1 & 15
printf("%d \n", i);
}
}
return 0;
}