на с++?
да С++
#include using namespace std; int main() { int n, as = 0, ap = 1, bs = 0, bp = 1, cs = 0, cp = 1; cin >> n; for (int i = 1; i <= n; i++)<br> { if (i % 2 == 0) { as += i; ap *= i; } else { bs += i; bp *= i; } if (i % 3 == 0) { cs += i; cp *= i; } } cout << as << ' ' << ap << ' ' << bs << ' ' << bp << ' ' << cs << ' ' << cp << endl;</span> return 0; }