반응형 포인터1 [HackerRank] Pointer - Easy https://www.hackerrank.com/challenges/c-tutorial-pointer/problem Pointer | HackerRank Learn how to declare pointers and use them. www.hackerrank.com #include #include void update(int *a,int *b) { // Complete this function int sum,minus; sum= *a+*b; minus = *a-*b; *a=sum; *b=abs(minus); } int main() { int a, b; int *pa = &a, *pb = &b; scanf("%d %d", &a, &b); update(pa, pb); printf("%d\n%d", a, b).. 2019. 10. 12. 이전 1 다음 반응형