Write a function using while loop, add the number to 10, then return the product to the main function. Use double.
#include <iostream>
using namespace std;
double fun(double n);
int main()
{
cout<<"value is : "<<fun(23.6);
return 0;
}
double fun(double n)
{
while(1)
{
return n+10;
}
}
Get Answers For Free
Most questions answered within 1 hours.