3

I have problems with problem Set 1. I submit last year programs greedy.c, hello.c and mario.c to your staff to check correctness. Yesterday I received assessment that program greddy.c is correct 3 from 9 parameters which CS50 staff are checked. I check this program again-in my computer CS50 appliance everything is working no mistakes. For example - input of 0.15 yields output of 2- I have assessment 0 which means that this condition is not working. I check this again in my program-evertyhing is o.k., input of 0.15 yields I have output 2 which means 1 coin of dime (10 cents coin) and one coin of nickel (5 cents coin). What I need to do, because i have 0.5 point from 1.0 which means I did not pass this Problem Set? I submit this programs today again. Maybe You can write me suggestions what I need to do? My e-mail address is:[email protected]

With Regards, Janis

1
  • 4
    Could we see check50's output for hello.c, mario.c, and greedy.c? Commented Jan 5, 2015 at 13:05

2 Answers 2

1

Thanks for answer! As I understand from you I need to check the correctness of my program. I did this today- I wrote in CS50 appliance- check50 2014/x/pset1/greedy greedy.c, the output was-https://sandbox.cs50.net/checks/3c82354cc47543e5902d22eda0fa59bf. Is this correct? What i need to do? Maybe you have the program Team Viewer, I can tell you my password and ID and you can get in my computer and navigate to CS50 appliance and run this programs?

1
  • If you click on one of the red bars in the link you posted, you can see what it doesn't like. In this case, it's "Expecting the following on standard out — 4\n ... but received the following on standard out instead — 4". All you should need to do is add \n to your printf line.
    – Melde
    Commented Jan 6, 2015 at 16:08
1

Thanks for answer! Where in the Problem Set1 program greedy.c function printf("%d",coins) i need to add this \n - somewhere in placeholder %d or.....? As I understand this \n - means print output in next line?

With Regards, Janis

1
  • I had exactly the same problem, but i fixed it with check50. You need to write the new line sing (\n) exactly after the %d, close the "", put a comma, and then call for the integer you need to print. Should work. Commented Jan 10, 2015 at 17:08

You must log in to answer this question.

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