Guest User

Untitled

a guest
Oct 19th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int num1, num2;
  7.  
  8. cout << "請輸入被除數:";
  9. cin >> num1;
  10.  
  11. cout << "請輸入除數:";
  12. cin >> num2;
  13.  
  14. if (num1%num2 == 0) {
  15. cout << num1 << "是" << num2 << "的倍數";
  16. } else {
  17. cout << num1 << "不是" << num2 << "的倍數";
  18. }
  19. cout << "程式結束啦,掰掰!";
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment