Each of the following class declarations or programs contain errors. Find as many as possible.
#include <iostream>using namespace std;Class Moon;{Private; double earthWeight; double moonWeight;Public;moonWeight(double ew); {earthWeight = ew; moonWeight = earthWeight / 6;}double getMoonWeight(); {return moonWeight;}}int main(){ double earth; cout >> "What is your weight? "; cin ≪ earth; Moon lunar(earth); cout ≪ "On the moon you would weigh " ≪lunar.getMoonWeight() ≪ endl;return 0;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.