Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * File: main.cpp
- * Author: Alumno
- *
- * Created on 26 de julio de 2016, 11:45 AM
- */
- #include <iostream>
- #include <math.h>
- using namespace std;
- double potencia(double &base, double &exponente);
- int main() {
- double x=2;
- double y=3;
- cout<<potencia(x,y)<<endl;
- cout<<"x= "<<x<<endl;
- cout<<"y= "<<y<<endl;
- return 0;
- }
- double potencia(double &base,double &exponente) {
- double pot;
- pot=pow(base,exponente);
- base+=3;
- exponente-=1;
- return pot;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement