小朋友學C語言(23):二進制與十進制之間的轉換

在學本節以前,請先複習 小朋友學C語言(17):二進制css 1、二進制轉換爲十進制的C語言代碼 #include <stdio.h> #include <string.h> int binary2decimal(char str[]) { int sum = 0; int j = 1; int pos = strlen(str) - 1; for(; pos >
相關文章
相關標籤/搜索