1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | A043:十六進位檢視器 /* 描述 輸入一段連文字,印出該連文字的十六進位資料。 心得 : 使用c的方法顯示16進位 */ #include<iostream> using namespace std; int main() { char str[1000]; cout<<"Input:"<<endl; cin>>str; cout<<"Memory:"<<endl; for(int i=0;i<strlen(str);i++) { unsigned char a=str[i]; printf("%X",a); } return 0; } |
Direct link: https://paste.plurk.com/show/2530735