#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 *pData = new SensorData; pData->x = x; pData->y = y; pData->z = z; cout << pData->x << " " << pData->y << " " << pData->z; delete pData; return 0; }
Test Cases
Test Results
Input
3 4 5
Expected Output