seergiomv

ejercicio 1.2

Oct 4th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     float n;
  5.     printf("Introduzca un número: ");
  6.     scanf("%f", &n);
  7.     if (n >= 0){
  8.         printf("El número es positivo");
  9.     } else {
  10.         printf("El número es negativo");
  11.     }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment