Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 C# 将 5 除以 3。除法后,我可以使用什么运算符来获取余数或模数?
你可以这样做:
double answer = 5.0/3.0; int remainder = 5 % 3; int quotient = 5 / 3;