Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a;
  6. scanf("%d",&a);
  7. int ch1 = a % 10;
  8. int ch2 = a % 100 / 10;
  9. int ch3 = a % 1000 / 100;
  10. int ch4 = a / 1000;
  11. printf("%d\n", a % 10 + a % 100 / 10 + ch3 + ch4);
  12. printf("%d", ch1 * ch2 * ch3 * ch4);
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement