Advertisement
payjack

EXtra credit 1

Oct 24th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. //extra credit
  2. //calculating exponents
  3.  
  4. #include <iostream>
  5. #include <iomanip>
  6.  
  7. using namespace std;
  8.  
  9. void input (int base, int exp)
  10. {
  11.    cout<<"Exponent calculator"<<endl;
  12.    cout<<"Please enter the base : "<<endl;
  13.    cin>>base;
  14.    cout<<"Please enter the exponent : "<<endl;
  15.    cin>>exp;
  16. }
  17.  
  18. void output ()
  19. {
  20.     cout<<base<<" raised to the "<<exp<<" power is "<<answer<<endl;
  21. }
  22.  
  23. calcExp (int base, int exp)
  24. {
  25.    f
  26.    
  27. }
  28. int main ()
  29. {
  30.     int base;
  31.     int exp;
  32.     int answer;
  33.     void input (base, exp);
  34.     void output (base, exp, answer);
  35.    
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement