Factorial C++

//Factorial //Giame Carlos Fajardo Santos #include<iostream> using namespace std; main(){ system ("color f0"); int startter=0,i=0,factorial=1; cout<<"Type a integer"; cin>>startter; for(i=startter;i>=1;i--){ cout<<i<<"\n"; i>1?cout<<"x":cout<<"\n"; factorial=factorial*i; } cout<<"The Factorial is:"<<factorial; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.