Created
October 19, 2017 14:09
-
-
Save hansen033/d2a4e621f6ffd69b38209e5ffe2002ca to your computer and use it in GitHub Desktop.
2017.10.05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int a, b; | |
cout <<"判斷a是否為b的倍數\n"; | |
cout <<"\n請輸入a:"; | |
cin >> a; | |
cout <<"請輸入b:"; | |
cin >> b; | |
if (a%b==0){ | |
cout<< "\n" << a << "是" << b << "的倍數"; | |
}else{ | |
cout<< a << "不是" << b << "的倍數"; | |
} | |
cout <<"\n\n謝謝使用"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment