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 91515151 at 2004-12-14 21:34:20 on Problem 1658
#include<stdio.h>
int n;int num[n][5];
int main()
{
   scanf("%d",&n);
   
   int i,j;
    for(i=0,j=0;i<n,j<4;i++,j++)
    {
       scanf("%d",&num[i][j]);
       
    }
    
    for(i=0;i<n;i++)
    {
      if(num[i][3]/num[i][2]==num[i][2]/num[i][1])
           num[i][4]=num[i][3]*num[i][2]/num[i][1];
      else 
           num[i][4]=num[i][3]+num[i][2]-num[i][1];
    }
    
    for(i=0,j=0;i<n,j<5;i++,j++)
    printf("\n%d  %d  %d  %d  %d",num[i][j]);
	return 0;
}

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