大數相減(不支援負數)

2021-07-11 10:42:52 字數 1783 閱讀 3481

#define _crt_secure_no_warnings

#include

#include

#include

#define n 1000 //此處可以改輸入大資料的位數

struct add_number

;typedef struct add_number a_n;

a_n* node(a_n*head, int inum)  //建立鍊錶

else

p->pnext = newnode;

}return head;

}a_n* invert(a_n*head)  //倒置鍊錶

while (p2 != null)

head->pnext = null;

head = p1;

return head;

}int change_to_str(a_n*head, char *number) //將鍊錶中的數轉換為字元陣列中,返回數的個數

return count;

}void show_all(a_n*head) //顯示全部節點

while (p != null)

else

p = p->pnext;

if ((p!=null)&&(p->pnext == null) && (zero == 0))//此處p!=null 必須在前面,當p=null 時防止執行p->pnext

}printf("\n");

}a_n* free_all(a_n *head)  //釋放記憶體

free(p1);

head = null;

return head;

}a_n * sub(a_n*head1, a_n *head2, a_n *head3)

else

}else

if (ten == 1)

else

}p1 = p1->pnext;

p2 = p2->pnext;

}while (p1 != null)

else

else

}p1 = p1->pnext;

}return head3;

}int input(char number1, char number2, int n)//輸入資料,並且判斷第乙個數和第二個數的大小,如果第乙個大返回0,第乙個小返回1

if (length_n1 > length_n2)

else if (length_n1 < length_n2)

else

else if (number1[i] < number2[i])

else}}

return minus;

}a_n *change_node(char number)//將字元陣列轉變成鍊錶

return head;

}void show()

;char number2[n] = ;

int minus;

minus = input(number1, number2, n);

head1 = change_node(number1);

head2 = change_node(number2);

if (minus == 1)

else if (minus == 0)

head1=free_all(head1);

head2=free_all(head2);

head3=free_all(head3);

system("pause");

}void main()

mysql不支援 MySQL不支援的特性

mysql 1 不支援物化檢視。2 不支援位圖索引。3 不支援並行查詢。4 不支援雜湊關聯,mysql的所有關聯都是巢狀迴圈關聯。不過,可以通過建立乙個雜湊索引來曲線實現。5 不允許對同一表同時進行查詢和更新。報錯 update tb1 as outer tb1 set cnt select cou...

rsyslog input 不支援變數

input type imfile file usr local apache tomcat 7.0.55 8082 logs localhost access log.txt tag zjzc api access01 severity info facility local5 不支援這種寫法 i...

linux vi 不支援中文

問題說明 網頁html與chi語言的結合,使用c語言輸出html語句,因為其中用到中文,出現亂碼 問題解決 1.在cgi中用到的 使用utf 8編碼,utf 8是國際統一的中文編碼 具體語句為 fprintf cgiout,metacharset utf 8 參考文章 2.上述步驟完成後,重新編譯,...