Computer Science, asked by satwantuppal99, 21 days ago

output of program
#include
using namespace std;

int result(int n)
{
if(n<=10)
return n;
else
{
int a= n%10;
int b= n/10;
return a+ result(a+b);
}}
int main()
{
cout< return 0;
}

Answers

Answered by v4vinssj5
1

Answer:

This will throw an error.

Explanation:

Because cout is missing one angular bracket (<) and also because cout cannot return 0;

If there was another statement then that statement will have been printed instead (However it should not be a keyword)

If you want output of the function result then you should call it in the main function by supplying a number to be assigned to n in result function.

Without your preferred value of n, I cannot tell you the output/working of the result function.

Similar questions