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<stdio.h>#include<cmath>usingnamespacestd;voidupdate(int*a,int*b){// Complete this function inttemp,noAbs;temp=*a;noAbs=temp-(*b);*a=*a+*b;*b=abs(noAbs);}intmain(){inta,b;int*pa=&a,*pb=&b;scanf("%d %d",&a,&b);update(pa,pb);printf("%d\n%d",a,b);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 →
using cmath lib