标签:tchar 用户 std clu main class bsp 求和 stdio.h
#include <stdio.h> int main(int argc, const char *argv[]) { int num = 0,sum = 0; char ch; while((ch = getchar()) != ‘\n‘) { if(ch != ‘ ‘) { num = num*10+ch-‘0‘; } if(ch == ‘ ‘) { sum = sum +num; num = 0; } } printf("%d\n",sum+num); return 0; }
标签:tchar 用户 std clu main class bsp 求和 stdio.h
原文地址:https://www.cnblogs.com/billcharint/p/10741485.html