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

Re:再借地方用一下。^_^

Posted by ass at 2003-12-03 22:41:40 on Problem 1028
In Reply To:借地方用一下。^_^ Posted by:ass at 2003-12-03 22:32:02
#include "math.h"
#include "stdio.h"
void main()
{
	int a[10],b[10],i,j,n;
	for (i=0;i<10;i++)
	{
		scanf("%d",&a[i]);
        b[i]=a[i]/10%10;
	}
	for (i=0;i<10;i++)
	{
	    n=0;
		for (j=0;j<10;j++)
		{
			if (b[j]==i) 
			{
				printf("%d ",a[j]);
				n++;
			}
		}
		if (n>0) printf("\n");
	}
}

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