1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #pragma warning (disable:4996) #include <stdio.h> int main() { int num1, num2; int* ptr1 = &num1; int* ptr2 = &num2; scanf("%d", ptr1); scanf("%d", ptr2); printf("%d + %d = %d\n", *ptr1, *ptr2, *ptr1 + *ptr2); printf("%d - %d = %d\n", *ptr1, *ptr2, *ptr1 - *ptr2); printf("%d * %d = %d\n", *ptr1, *ptr2, *ptr1 * *ptr2); printf("%d / %d = %d\n", *ptr1, *ptr2, *ptr1 / *ptr2); return 0; } | cs |
프로그래밍 문제/정올