1

My program is working correctly but all checks on the Gradebook have failed.

I think problem is in printf, but what is the reason?

I just print a few words and after that at new line the program will get a string.

int main (int arg , string arv [])
{

    if (arg != 2)
    {
        printf ("Usage: ./ceasar.c key \n");
        return 1;
    }

    int k = atoi(arv[1]);
    int low_let = 'a';
    int up_let = 'A';

    printf("Enter string: \n");
    string s = GetString();
    string encr = s;

    for (int i = 0; i < strlen(s); i++)
    {
        if ( isalpha(s[i]))
        {

Some clarification: I have a different problem than in I can't get any grade on Gradebook because some programs were successfully checked:

and my test results look good:

jharvard@appliance (~/Dropbox/pset2): ./caesar 1
Enter string: 
a
b 
jharvard@appliance (~/Dropbox/pset2): ./vigenere BaZ
Enter string: 
BaRFoo
CaQGon   

Problem with check50 was solved after running command update50 more details can be found here: Why does check50 fail with status code 400?

4
  • How long has it been since you submitted your solution? – Air Nov 18 '14 at 19:33
  • Thanks for reply @AirThomas! But I have another problem. Programms were checked successfully for cases when incorrect arguments were entered: – LeVl Nov 18 '14 at 22:01
  • Great, thanks for the clarification. When you run check50, you will see a web link at the end to sandbox.cs50.net - I think in this case, that link would show you more details about what is wrong. – Air Nov 18 '14 at 23:05
  • well, actually I know about this opportunity) but the main problem when I'm using it, server on CS50 is turn off, always getting error 400. Prepared new files and loaded them again, awaiting results) @AirThomas – LeVl Nov 19 '14 at 8:32
0

a bit the same problem was here and in my case it wasn't been obvious: Script which is using for checking, is expecting to get a result at the second OUTPUT row. And my code will return only blank row, a bit strange bug.

printf("Enter string: \n");      -- 1 row

string s = GetString();          -- 2 row         BaRFoo

                                 -- 3 row answer  CaQGon

I saw it another question, but there problem was a bit different.

for check50 error 400 necessary to run command from terminal: update50

More details youcan find here: Why does check50 fail with status code 400?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .