|
|
back to boardФакториАААЛы !!!! Что не так ?? #include <stdio.h> #include <string.h> int main() { int a, fact = 1, i, count; char str[256]; scanf("%i %s", &a,str); for (count = 0; str[count] != '\0';) if (str[count] == '!') count++; if (a%count != 0) for (i = a%count; i <= a; i += count) fact *= i; else { fact *= count; for (i = count; i <= a; i += count) fact *= i; } printf("%i", fact); return 0; } Re: ФакториАААЛы !!!! else { //fact *= count; for (i = count; i <= a; i += count) fact *= i; } Here is problem. |
|
|