Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include "stdafx.h"
  2.  
  3.  
  4. int _tmain(int argc, _TCHAR* argv[])
  5. {
  6. int a, b;
  7. printf("請輸入一三位數且由1~9所組成\n");
  8. scanf("%d", &a);
  9. b = (a%10)*100 + (a/10)%10 * 10 + a/100;
  10. printf("%d\n%d\n", b, a+b);
  11.  
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement