假设a、b都是整数,a%b是指a除以b的余数,也叫取模运算。
1 2 3 4 5 6 7 8 9 10
#include <iostream> using namespace std; int main() { int a=5,b=3; cout<<a%b<<endl; cout<<5%2; return 0; }
Username or Email Address
Password
Remember Me
Username
Email
Registration confirmation will be emailed to you.