i might let you edit your profile if you tell my why this program gives me an infinite loop for all statements other than '.'



#include <stdio.h>
#include <stdlib.h>

#define SENTINEL '.'

int
main()
{

char checksum, finalcheck;
int sum, check;

sum = 0;

while(sum != 46)
{

printf("Enter a one-line message. Complete your message with a period.\n");
printf("Enter a message: ");

while(checksum != SENTINEL)
{
scanf("%c", &checksum);
sum += (int)checksum;
}
if(sum != 46)
{ check = sum % 64;

finalcheck = (char)(check + 32);

printf("Checksum: %c\n", finalcheck);
}
else
printf("Program ended.\n");


}

return(EXIT_SUCCESS);
}