Answer to Question #38297 in C++ for Keshav Kumar

Question #38297
write a function prototype (in C++) for a function which accepts two integers as parameters and returns their difference.
1
Expert's answer
2014-01-10T08:33:11-0500
#include <iostream>

using namespace std;

int diff(int, int); // prototype

int main()
{
cout << diff(5, 2);
cin.get(); cin.get();
return 0;
}

int diff(int a, int b) // function
{
return a - b;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
16.01.14, 17:31

You're welcome. We are glad to be helpful. If you really liked our service please press like-button beside answer field. Thank you!

Keshav Kumar
11.01.14, 21:26

Thank u sir...... It's very helpful for me...

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS