Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C_141204_ValorNumerico
//Title of this code #include <stdio.h> int main(void) { char numero[20]; short todoDigitos; long N; short i; printf("Introduzca el valor numerico ... "); gets(numero); for(todoDigitos = 1 , i = 0 ; numero[i] && todoDigitos ; i++) { if(!isdigit(numero[i])) { todoDigitos = 0; } } if(todoDigitos) { for(N = 0 , i = 0 ; numero[i] ; i++) { N *= 10; N += numero[i] - '0'; } printf("N = %ld\n", N); } else { printf("El valor %s no es numérico.", numero); } return 0; }
run
|
edit
|
history
|
help
0
string.c
lambda
armstrong number using a while loop
3D NO SE XD
strrev
DUE BY TUESDAY
Hello world.c
pointer**
child process
LECTURA DE CADENAS CON FGETS