Created
August 1, 2019 15:22
-
-
Save parzibyte/1e5e2c457b3aaa70a5239177e547d245 to your computer and use it in GitHub Desktop.
Leer datos por teclado en C - https://parzibyte.me/blog/2018/11/19/leer-datos-teclado-c-scanf/
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
/* | |
Utilizar scanf para leer una variable entera en C | |
@author parzibyte.me | |
*/ | |
#include <stdio.h> | |
int main(){ | |
int numero; // Aquí alojaremos el valor leído | |
printf("Dime un número:\n"); | |
scanf("%d", &numero); // Atención al operador & | |
printf("El número que pusiste es: %d", numero); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment