#include <iostream>using namespace std;int main(){ int n,ge,shi,bai,he; cout << "请输入一个三位数:"; cin >> n; ge=n%10; shi=(n/10)%10; bai=n/100; he=ge+shi+bai; cout<<"各个位数之和是:"<<he<<endl; return 0;}