這是程式內容:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
char manywords[1000];
int count=0;
int ItTrue=1;
int shift=0;
while( scanf("%s",manywords) != EOF){
//scanf("%s",manywords);
for(int i=0; (int)manywords[i] != 0 ;i++) {
count++;
}
for( shift= -32 ; shift < 3; shift++) {
ItTrue = 1;
for(int i=0; i<count;i++){
if( ( ( (int)manywords[i] + shift) <32 ) || ( ( (int)manywords[i] +shift )> 126) ) {
ItTrue = 0;
i=count; // to break.
}
}
if(ItTrue) { break; }
}
for(int i=0;i < count ;i++){
printf("%c", (char) ( (int)manywords[i] + shift) );
}
printf("\n");
}
}