I read about a library called <stack> . It's new one 4 me 'cause I'm in highscool. So , i used it 4 making an unsual factorial algorithm . Here is it :
#include <iostream>
#include <stack>
using namespace std ;
int factorial ( int n )
{
stack <int> st ;
int top=0;
int urc;
int i ;
int rez(1);
if ( (n == 0) || (n == 1) ) return 1 ;
else
{
urc = 1 ; i = 2 ;
while ( urc )
{
if ( st.top() != n )