Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
B_141202_CADENA_NUMERO
//Title of this code #include <stdio.h> #define _T 10 int main(void) { char numero[_T]; short i; short esNumero; long N; printf("Valor numerico ... "); gets(numero); for(i = 0 , esNumero = 1 ; numero[i] ; i++) { if(!isdigit(numero[i])) { esNumero = 0; } } if(esNumero) { for(N = 0 , i = 0 ; numero[i] ; i++) { N *= 10; N += numero[i] - '0'; } printf("El numero introducido es %ld\n", N); } else { printf("No ha introducido un número ...\n"); } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
length
Test 3
fgets and basic string manipulation
Spring 2017 Lab 4 v0.5
función free()
bitmask2
PRACTICE 1
z is 7
FUNTION4
arrows
stackse - search stackoverflow differently
Please log in to post a comment.