All submissions
#include <iostream>
using namespace std;

class Sensor {
public:

      // your code here: define constructor taking int id and printing "Sensor <id> initialized"
      int id;
      Sensor(int v){
            id = v;
            cout<<"Sensor "<<id<<" initialized"<<endl;
      }
};

int main() {
   Sensor s(101);
   return 0;
}
Loading...

Input

Expected Output

Sensor 101 initialized