#include <stdio.h> #include <stdlib.h> int getval(void); int main() { int weight; weight=getval(); return(0); } int getval(void) { char input[20]; int x; printf("some integer:"); gets(input); x=atoi(input); return(x); }
some integer:123