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.
voidupdate(int*a,int*b);intmain(){/* Enter your code here. Read input from STDIN. Print output to STDOUT */inta,b;std::cin>>a>>b;update(&a,&b);std::cout<<a<<std::endl;std::cout<<b<<std::endl;return0;}voidupdate(int*a,int*b){inttempA=*a;inttempB=*b;*a=tempA+tempB;*b=abs(tempA-tempB);}
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 →