Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to express '\n' in testcase of input? #46

Closed
zgjava opened this issue Apr 26, 2012 · 1 comment
Closed

How to express '\n' in testcase of input? #46

zgjava opened this issue Apr 26, 2012 · 1 comment

Comments

@zgjava
Copy link

zgjava commented Apr 26, 2012

include < stdio.h >

int main()
{
int i;
char c;
char c1[81],c2[81];
printf("input cipher code:");
for(i=0;(c=getchar())!='\n';i++)
{
c1[i]=c;
if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
{
if(c>='A'&&c<='Z')
c=(90+65)-c;
else c=122+97-c;
c2[i]=c;
}
else c2[i]=c;
}
c1[i]='\0';
c2[i]='\0';
printf("\ncipher code :%s", c1);
printf("\noriginal text:%s\n",c2);
return 0;
}

@zgjava
Copy link
Author

zgjava commented Apr 26, 2012

shift+enter

@zgjava zgjava closed this as completed Apr 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant