"write a program" same as implementation?

I am just really drawing a blank here, does being asked to "write a program that does such and such" mean the same as this:

Write the implementation of
 
int ipow (int base , int exp );


apologies if this question is unfit for the community, I just don't have anyone to ask.
Last edited on
Ok so yes and no. This is how I interpret it. Whoever has assigned this for you to do wants you to build a program the implements that function. You need to build the part of the program to demonstrate that that function works and you need to build the function itself. What is given to you is the function definition: int ipow (int base , int exp ) Which tells you that your function will be a value-returning function named ipow that returns an int and is passed two integer variables. Your code should look something like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

using namespace std;

//function prototype
int ipow(int, int);

int main() {

	//code to call function and demostrate it works
	//example
	cout << "Passing (2,4) should return 16, it returns: "<< ipow(2,4) << endl;

	return 0;
}

int ipow(int base, int exp) {
	int answer;
	//code to rase base to exp
	return answer;
}
Topic archived. No new replies allowed.