Telemetry Packet Memory Cleanup

#include <iostream>
using namespace std;

int main() {
    int firstValue, secondValue;
    cin >> firstValue >> secondValue;

    int *packet1 = new int(firstValue);

    delete packet1;

    int *packet2 = new int(secondValue);

    cout << *packet2;

    delete packet2;



    // Write your dynamic allocation logic here

    return 0;
}

Solving Approach

 

 

 

 

 

 

Upvote
Downvote
Loading...

Input

25 40

Expected Output

40