Last active
October 19, 2017 06:57
-
-
Save hansen033/64d88cd1ff4385482d42321c257670c0 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 << "請輸入被除數:"; | |
cin >> a; | |
cout << "請輸入除數:"; | |
cin >> b; | |
if (b > a){ | |
cout << "我很笨,不會算小數唉..."; | |
} else if (b == 0){ | |
cout << "你輸入的除數是0,除以0的算式無意義"; | |
} else { | |
cout << a << "/" << b << "=" << a/b << "···" << a%b << "\n" << "\n"; | |
} | |
cout << "掰掰喔!祝你一切順心"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment