摘要:
右移:先变成2进制,再整体往右移,such as:8->0100,右移后->0010; include<stdio.h> int n; int main() { scanf_s("%d", &n); printf("%d", n >> 1); return 0; } 左移同理,不过需要注意只适于正数 阅读全文
posted @ 2024-05-09 22:09
lintangle
阅读(10)
评论(0)
推荐(0)
摘要:
getline 用法 istream& getline ( istream &is , string &str , char delim ); delim 是遇到它便停止,如果没有,则默认为'\n'; 阅读全文
posted @ 2024-05-08 15:12
lintangle
阅读(8)
评论(0)
推荐(0)