Search found 1 match

by 黃玉&
Thu Jan 18, 2007 10:15 am
Forum: Volume 4 (400-499)
Topic: 458 - The Decoder
Replies: 71
Views: 27790

I don't understand why it can't run Q458

#include<stdio.h>
#include<stdlib.h>
int main()
{
char c;
char *Output;
int i=0,j;

printf("please input words\t");

Output=(char*)malloc(100*sizeof(char));

while((c=getchar())!='\n')
{
Output =c-'J'+'C';
i++;
}

for(j=0;j<i;j++)
printf("%c",Output[j]);

printf("\n");

free(Output ...

Go to advanced search