Answer to Question #315960 in C++ for Badlyneeded

Question #315960

The first function must be responsible for inputting the data, the second for computation of squares and the third, for Displaying the result.


1
Expert's answer
2022-03-22T16:04:53-0400
void EnterSqrt(int i)
{
	cout << "Enter square num:" << endl;
	cin >> i;
}
int CompSqrt(int f)
{
	EnterSqrt(f);
	return f * f;
}
void PrintSqrt(int j)
{
	cout << CompSqrt(j) << endl;
}
int main()
{
	int num;
	EnterSqrt(num);
	CompSqrt(num);
	PrintSqrt(num);
}

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

LATEST TUTORIALS
New on Blog