D - Сумма цифр числа

Anonymous
c_cpp
09/25/2023 12:44 PM
200 B
23
Indexable
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    cout << n % 10 + n / 10 % 10 + n / 100;
    return 0;
}
Editor is loading...