新型冠状病毒转二进制(首发)
作者:互联网
#include <iostream>
#include <stdlib.h>
using namespace std;
void outc(char c)
{
unsigned char k = 0x80
for (int i=0; i<8; i++, k >>= 1){
if (c & k){
printf("1");
} else{
printf("0");
}
}
printf(" ");
}
int main (){
char str[]="新型冠状病毒";
for(int i=0; str[i]; i++){
outc(str[i]);
}
system("pause");
return true;
标签:冠状病毒,二进制,char,首发,int,outc,str,printf 来源: https://blog.csdn.net/aa804738534/article/details/104824981