Answer to Question #191861 in C++ for Aduu

Question #191861

Construct a C++ program to find the square of a number using default arguments and inline functions



1
Expert's answer
2021-05-11T23:52:18-0400
#include <iostream>
using namespace std;
inline int square(int s)
{
	return s*s;
}
int main()
{
	cout << "The square of 3 is: " << 
	square(3) << "\n";
	return 0;
}

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

No comments. Be the first!

Leave a comment