Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Using c++ language, create a function called recip() that takes one double reference parameter.Have the function change the value of that parameter into its reciprocal.Write...

Using c++ language, create a function called recip() that takes one double reference parameter.Have the function change the value of that parameter into its reciprocal.Write a program to demonstrate that it works

Answers


Davis
#include
using namespace std;
void recip(double &d);
int main()
{
double = 100.0;
cout "x is " x '\n';
return 0;
}
void recip(double &d)
{
d = 1/d;
}
Githiari answered the question on May 29, 2018 at 18:48

Answer Attachments

Exams With Marking Schemes

Related Questions