struct Big_number{
int data[N];
int len;
};
void Add_big_number(Big_number &a,Big_number &b)
{
int carry,i,len,temp;
len = a.len > b.len ? a.len : b.len;
carry = 0;
for (i = 0;i < len;i++)
{
if(i>=a.len)
{
a.data[i]=0;
}
if(i>=b.len)
{
b.data[i]=0;
}
temp = a.data[i] + b.data[i] + carry;
carry = temp / 10;
a.data[i] = temp % 10;
}
if (carry != 0)
{
a.len = len + 1;
a.data[len] = carry;
}
else
{
a.len = len;
}
}
----------------解决方案--------------------------------------------------------
#include<stdio.h>
void main()
{
printf("谢谢各位哥哥/姐姐的支持");
}
----------------解决方案--------------------------------------------------------