fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int a,b,c;
  5. c = 188 % 10;
  6. b = (188 % 100 - c) / 10;
  7. a = (188 % 1000 - (b * 10 + c)) / 100;
  8. cout << a + b + c;
  9. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
17