We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#include<iostream>usingnamespacestd;voidupdate(int*a,int*b){intc,d;c=*a+*b;// arithmetic operation according to challanged=abs(*a-*b);// arithmetic operation according to challange*a=c;*b=d;}intmain(){inta,b;int*pa=&a,*pb=&b;cin>>a>>b;update(pa,pb);cout<<a<<endl;cout<<b<<endl;return0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Pointer
You are viewing a single comment's thread. Return to all comments →
C++20: