calcular a potencia de um numero no Dev-C++

01:54Fresh Young´s

include <iostream.h> 
#include <stdio.h> 
#include <stdlib.h> 
#include <math.h> 

main(){ 

int base,expoente; 
double x ; 

cout << "Base: "; 
cin >> base; 

cout << "Expoente: "; 
cin >> expoente; 

x = pow (base, expoente); 

cout << "\n" << base << " elevado a " << expoente << " = " << x << "\n"; 

system("pause"); 


}

You Might Also Like

0 comentários

Popular Posts

Formulário de Contacto