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
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);
}
Comments
Leave a comment