C_C++
그 외의 변환 함수 : atoi, atol, atof
bluedevil77
2011. 1. 13. 19:20
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char str[20];
printf("정수 입력 : ");
scanf("%s", str);
printf("%d \n", atoi(str));
printf("실수 입력 : ");
scanf("%s", str);
printf("%g \n", atof(str));
return 0;
}