#include <iostream> using namespace std; // Write your struct and dynamic allocation code here typedef struct SensorData { int x; int y; int z; } SensorData; int main() { int x, y, z; cin >> x >> y >> z; // Write your dynamic allocation logic here SensorData *sd = new SensorData; sd->x = x; sd->y = y; sd->z = z; std::cout << sd->x << " " << sd->y << " " << sd->z; delete sd; return 0; }
Test Cases
Test Results
Input
3 4 5
Expected Output