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

AC了的代码,呵呵

Posted by gfedcba at 2009-01-04 18:07:05 on Problem 1298 and last updated at 2009-01-05 10:07:02
#include <iostream>
using namespace std;

int main()
{
    char *s="VWXYZABCDEFGHIJKLMNOPQRSTU";
	char code[101];
	char temp[10];
	gets(temp);
	while (strcmp(temp,"START") == 0)
	{
		
		
			gets(code);
			int i;
			for (i=0; i<=strlen(code)-1; i++)
			{
				if (code[i]>='A' && code[i]<='Z' )
				{
					code[i] = s[code[i]-'A'];
					
				}
			}
			
			gets(temp);
			puts(code);
			gets(temp);		
	}
	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