Sun Haozhe's Blog

Sun Haozhe's Blog


  • Home

  • Categories

  • Archives

  • Tags

  • About

  • Search

C++ details about division /, modulo %

Posted on 2019-07-14 | In C++
| Words count in article 63
1
2
cout << (-23) / 10 << endl;
-2
1
2
cout << (-23) % 10 << endl;
-3
1
2
3
cout << (-23) / (-10) << endl;
Out:
2
1
2
3
cout << (-23) % (-10) << endl;
Out:
-3
# C++
C++ strange behaviors of size_t
C++ pointer, *, reference, &
Sun Haozhe

Sun Haozhe

GitHub IO blogs

78 posts
4 categories
16 tags
GitHub
© 2019 - 2024 Sun Haozhe
Powered by Jekyll
Theme - NexT.Mist