#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <ctype.h>
int my_atoi(char *str)
{
int ret = 0;
int sign = 1;
char *point;
while(*str != '\0')
{
if(isspace(*str))
str++;
else
编写一个函数,将一个数字字符串转换成该字符串对应的数字(包括正整数、负整数) 例如:“12“ 返回12 “-123“ 返回-123 函数原型:int my_atoi(char *str) {}
最新推荐文章于 2023-05-12 08:51:36 发布