Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void input(int&,int&);
- void calc(int&, int&, int&);
- void output();
- int main()
- {
- int first,power,total;
- input(first,power);
- calc(total,first,power);
- output();
- return 0;
- }
- void input(int& first,int& power)
- {
- cout << "Enter the number you'd like to add to power" << endl;
- cin >> first;
- cout << "Now enter the power" << endl;
- cin >> power;
- }
- void calc(int& total,int& first, int& power,int& a)
- {
- for(a=power;a<=0;a++)
- {
- total *= power;
- }
- }
- void output(int& total)
- {
- cout << "The number is now;" << total << endl;
- }
Add Comment
Please, Sign In to add comment