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:runtime error???

Posted by June_Nie at 2013-09-06 09:01:25 on Problem 3438
In Reply To:runtime error??? Posted by:highspeed at 2009-10-31 20:50:49
> #include<stdio.h>
> int main()
> {
> 	int i,n,m,k=1;
> 	char a[100];
> 	scanf("%d",&n);
> 	for(i=1;i<=n;i++)
> 	{
> 		scanf("%s",a);
> 		m=0;
> 		while(a[m]!=NULL)
> 		{
> 			
> 			if(a[m+1]==a[m])
> 				k++;
> 			else {printf("%d%c",k,a[m]);k=1;}
> 			m++;
> 		}
> 		printf("\n");
> 	}
> 	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