题目描述:输入两个很大的正数(用C字符串表示),输出它们的乘积,假设不考虑非法输入。
C++代码实现:
#include<iostream>
#include<assert.h>
#include<string.h>
using namespace std;
void multiply(const char *a,const char *b){
assert(a != NULL && b != NULL);
int i,j,ca,cb,*s;
ca = strlen(a);
cb = strlen(b);
s = (int *

该博客介绍了如何使用C++编程语言实现两个大正数相乘的功能,以字符串表示输入,确保处理非法输入的情况。提供了具体的代码示例,并展示了测试运行结果。

7616

被折叠的 条评论
为什么被折叠?



