Demo entry 6785626

py

   

Submitted by lu on Mar 17, 2019 at 13:23
Language: C++. Code size: 406 Bytes.

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
 	char X[20],Y[20];
    cin>>X;
	int l=strlen(X);
	for(int i=0;i<l;i++)
	{
	if(X[i]=='A') Y[i]='x';
    else if(X[i]=='B') Y[i]='y';
    else if(X[i]=='C') Y[i]='z';
	else Y[i]=X[i]-3;
	if(Y[i] >='A' &&Y[i] <='Z')
	Y[i]+=32;
	cout<<Y[i];
	}
	cout<<endl;
	return 0;
}

This snippet took 0.01 seconds to highlight.

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).