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