Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101836 陈治宸 各个位数之和 C++ Compile Error 0 MS 0 KB 226 2024-12-20 13:28:02

Tests(0/0):


Code:

#include <iostream> using namespace std; int main() { int n,a,sum=0; cin >> n; while(n!=0) { a=n%10; sum+=a; n/=10; cout<<"各个数位之和"<<sum<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:1: error: expected '}' at end of input
 }
 ^