#include <stdio.h> #include <stdlib.h> #include <math.h> int a,product,sum; int main() { printf("\nEnter a:"); scanf("%d", &a); int firstSym; firstSym = a/1000; int secondSym; secondSym = (a/100)%10; int thirdSym; thirdSym = (((a/10)%100)%10); int fourthSym; fourthSym = a%10; product = firstSym + secondSym + thirdSym + fourthSym; sum = firstSym * secondSym * thirdSym * fourthSym; if (product>sum) { printf("Product top!"); } else if (product<sum) { printf("Sum top!"); } else { printf("idi naxyy"); } return 0; } C #include <stdio.h> #include <stdlib.h> #include <math.h> int a,product,sum; int main() { printf("\nEnter a:"); scanf("%d", &a); int firstSym; firstSym = a/1000; int secondSym; secondSym = (a/100)%10; int thirdSym; thirdSym = (((a/10)%100)%10); int fourthSym; fourthSym = a%10; product = firstSym + secondSym + thirdSym + fourthSym; sum = firstSym * secondSym * thirdSym * fourthSym; if (product>sum) { printf("Product top!"); } else if (product<sum) { printf("Sum top!"); } else { printf("idi naxyy"); } return 0; }