Potentiation help.

i have x and y reserved as number 1 and 2 ...i managed to make a calculator but can't get the potentiation to work :/

1
2
3
4
5
6
7
8
9
10
11
if(symbol=='^')
		{
			
			do{ c=x*x
				result=c*x;
				
				std::cout<<"result is: "<<result<<std::endl;
			}while(result=y);
		
		}
 


i need help with potentiation...i just can't get it to work...
also it must be in a loop..
c=x*x ..i forgot a comma..but not the case..
Topic archived. No new replies allowed.