Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
郁闷,请教各位。#include "stdio.h" #define Max 1000000000 #define Min 1 int main() { void MyFunction(int a,int *p); int a[10]={0}; int b[10]={0}; int Sum=0; int Temp=0; int A; int B; scanf("%d %d",&A,&B); //处理 MyFunction(A,a); MyFunction(B,b); //求积 Sum= Multiply(a,b); printf("%d",Sum); return 0; } void MyFunction(int a,int *p) { while(a>=Min) { *p=a%10; a=a/10; p++; } } int Multiply(int *p,int *q) { int S=0; int *k; k=q; while(*p!=0) { while(*q!=0) { S+=(*p)*(*q); q++; } q=k; p++; } return S; } 我的答案哪里错了?? 我的邮箱:569883964@qq.com 谢谢! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator