#include<stdio.h>标签:10,n2i,123456,23,int,str,基本功,main From: https://blog.51cto.com/u_15983838/6092948
int main(void)
{
int i=0,j=0;
char str[10]="123456";
while(str[i]!='\0')
{
j=10*j+(str[i]-'0');
i++;
}
printf("%d\n",j);
return 0;
}
#include<stdio.h>标签:10,n2i,123456,23,int,str,基本功,main From: https://blog.51cto.com/u_15983838/6092948
int main(void)
{
int i=0,j=0;
char str[10]="123456";
while(str[i]!='\0')
{
j=10*j+(str[i]-'0');
i++;
}
printf("%d\n",j);
return 0;
}