|
|
вернуться в форумCan you check out what's wrong here ? (c++) #include <bits/stdc++.h> using namespace std; int main(){ int n, sana,s; char k[21]; cin>>n; cin.getline(k,sizeof(k)); sana = strlen(k)-1; if (1<=n&&n<=10&&1<=sana&&sana<=20){ if(n%sana==0) { s=sana;} else { s=1;} while(n>0){ s*=n; n=n-sana;} cout << s << endl; } } Edited by author 28.01.2018 23:09 |
|
|