-
Notifications
You must be signed in to change notification settings - Fork 0
/
numeropon.c
39 lines (27 loc) · 849 Bytes
/
numeropon.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
// Universidad Sergio Arboleda
// Arquitectura de Computadores
// Taller Parcial 2
// Samuel Medina y Rober Burgos
// Profesor: JHon Corredor
// Seccion 2: Numero positivo o negativo
// En el presente ejercicio se sabra si un numero es negativo o positivo utilizando las estructuras If/Else.
#include <stdio.h>
int main(){
//Se crea la varible entera principal
int numA;
//Se saluda al usuario
printf("Bienvenido al programa \n");
//Se le pide un dato al usuario
printf("Digite un numero para saber si es negativo o positivo: \n");
scanf("%i", &numA);
//Se crean las operaciones
if(numA >= 0){
printf("El numero digitado es positivo \n");
}
else{
printf("El numero ingresado es negativo \n");
}
//Finaliza el programa
printf("Gracias por utilizar el programa. \n");
return 0;
}