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