Advertisement
iAmGhost

Untitled

Apr 4th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int numA, numB, numB_original, num, multipiler;
  6.  
  7.     printf("두개정수 입력: ");
  8.     scanf("%d %d", &numA, &numB);
  9.  
  10.     numB_original = numB;
  11.  
  12.     for (multipiler = 1; numB; multipiler*=10)
  13.     {
  14.         num = numB % 10;
  15.         numB /= 10;
  16.  
  17.         printf("%d x %d = %d\n", numA, num * multipiler, numA * (num*multipiler));
  18.     }
  19.  
  20.     printf("%d x %d = %d\n", numA, numB_original, numA*numB_original);
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement