É por essas e outras que tenho nojo de c++.
- Forums
- OTServ
- Recursos
- Linguagens de Programação
- C e C++
- [C++]Função Pow
2
2k
info
Group: Artesão
Joined: 17/04/07
Posts: 128
Reputation: +94
Tibia Character: Full Steel Alchemist

05 de setembro de 2012 às 17:40

info
Group: Herói
Joined: 23/11/07
Posts: 1.5k
Reputation: +87
Gender: Masculino
Postando na sessão mais animada do forum aeaeaeae
#include <iostream.h> int pt(int x, int y) {int r, p; r = 1; p = 0; if (y>=1) { doagain: p=p+1; r=r*x; if (p==y) { goto end;} else { goto doagain;}} else { return 0;} end: return r;} int main() {int a, b; cin>>a; cin>>b; cout<<pt(a,b)<<endl; system("Pause");}Edited Agosto 29 by Bernardo