Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

郁闷,请教各位。

Posted by mathpro at 2008-12-27 14:37:20 on Problem 3673
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator