All submissions
#include <iostream>
using namespace std;

class Sensor {
private:
int value= 0;
   // your code here: declare private int value
public:
void setValue(int v){
   value = v;
}
int getValue(){
   return value;
}
   // your code here: implement setValue and getValue
};

int main() {
   Sensor s;
   s.setValue(75);
   cout << "Sensor value: " << s.getValue();
   return 0;
}
Loading...

Input

Expected Output

Sensor value: 75