Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Factoriel
//g++ 5.4.0 #include <iostream> using namespace std; int main() { int n; cout << "n= \n"; cin >>n; if (n<=0) {cout <<"Bad input\n"; return 1; }; int fact=1; for (int i=2;i<=n;i++) fact=fact*i; cout <<fact; return 0; }
run
|
edit
|
history
|
help
0
as
Conjuntos - Comparar cantidad de elementos únicos en 2 vectores
Expected types
Bin Tree playground
star print1
use of assert to check a particular situation! (throws error)
point to a rvalue
Using initializer_list<T>
copy_30-Seconds-of-C++
Sort an array of 0s, 1s and 2s