Advertisement
iAmGhost

Untitled

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