Answer to Question #288545 in C++ for fisiwe

Question #288545

int findValue(int numberP)

{

int count = 0;

int value = 20;

while (count < numberP)

{

value += count;

count ++;

}

return value;

}

What will be the output of the following statement executed in the main function?

cout << findValue


1
Expert's answer
2022-01-18T14:07:06-0500
using namespace std;


int findValue(int numberP)
{
	int count = 0;
	int value = 20;
	while (count < numberP)
	{
		value += count;
		count ++;
	}
	return value;
}




//What will be the output of the following statement executed in the main function?
int main()
{
	cout <<"\n\tfindValue(10) = "<<findValue(10) ;
	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

LATEST TUTORIALS
New on Blog