跪求大整数(包括负数)四则运算的源代码(c#)

来源:百度知道 编辑:UC知道 时间:2024/05/12 03:32:11
大虾们```要c#的啊~~

大整数运算,溢出的整数运算,高精度
3楼的大哥 谢谢你这么热心

但我想要c#的,你的c++码我要在网上看到了

呵呵,怎么又是你啊,老弟!你这100分太诱人了

我给你一个,您提交的答案超过10000字,请删减,发不到这里,已经写成了完整的类了,你拿去用吧

体力活...
用字符串代替整数

你好:
大整数肯定是要用字符串存储的,代码如下:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_SIZE (1024)

char answer[MAX_SIZE];
char answersign;

void bigadd(char * n1, char * n2);
void bigsub(char * n1, char * n2);
void bigmul(char * n1, char * n2);
void bigtrim(char * num, int length);
void bigsort(char * n1, char * n2, int maxlen);
void printnum(char * num);

int main(int argc, char *argv[])
{
int count, index, place;
int len, len1, len2, maxlen;
int i;
char input[MAX_SIZE * 2], num[2][MAX_SIZE];
void (* func)(char *, char *);

scanf("%d", &count);

while (count--) {
scanf("%s", &input);
len = strlen(input);
index = 0;
place = 0;