Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- using namespace std;
- int main() {
- int a;
- scanf("%d",&a);
- int ch1 = a % 10;
- int ch2 = a % 100 / 10;
- int ch3 = a % 1000 / 100;
- int ch4 = a / 1000;
- printf("%d\n", a % 10 + a % 100 / 10 + ch3 + ch4);
- printf("%d", ch1 * ch2 * ch3 * ch4);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement