Guest squall Posted August 17, 2004 Report Posted August 17, 2004 I have my c++ resit tomorrow afternoon, its an open book exam that im not totally prepaired for. I can do the first 2 sections of the exam. Its just the last section - section c im not able to do. You have to write a program. My leacturer suggested i should have a program that would meet the requirements of the previous years exams, just incase it came up again, with a bit of a nudge and a wink i think. So if anyone has any free time tonight or before tomorrow afternoon, I would really appresaite if you could have a look at the past exam paper attached, and see if you can come up with anything. Theres beer in it for you at the next meet :)csc601c2.pdfcsc601c1.pdf
Guest ferret Posted August 17, 2004 Report Posted August 17, 2004 Sorry to be a boring old git, but isn't this cheating?
Guest squall Posted August 17, 2004 Report Posted August 17, 2004 no, seeing as its passed exam papers. Id be doing them anyway in preperation for the exam, like i did for the other modules i take. Most people use past papers as a guide to what to expect in an exam, theres nothing dodgy about it. Chances are there will be a similar but different question in the exam.
Guest ajb3000 Posted August 17, 2004 Report Posted August 17, 2004 So you're planning on "buying" someone a "free" beer at the next meet? hhmmm.... nice plan. Sorry but I don't know any C++.
Guest squall Posted August 17, 2004 Report Posted August 17, 2004 yeah i owe everyone beer anyway, exp owen, aka beersoft
Guest squall Posted August 17, 2004 Report Posted August 17, 2004 Just realised the maths one was at the top of the list, thats the hardest of the 3, so i have deleted it! hope you guys can help me out
Guest maxh2003 Posted August 18, 2004 Report Posted August 18, 2004 Prob. too late for you to read but here's my hurried answer to C. you'd get *some* marks for this, at least. {input is double a, double e} double x_previous = 0; double x = a; while(x_previous+x>e) { x_previous = x; x = (x_previous + a/x_previous) / 2; } sprintf("Answer is %d",x); The appropriate datatype is the highest-precision floating point datatype, namely DOUBLE, because this will give the algorithm's result maximum precision. Since we are dealing with square roots it is highly likely that the answer to a given arbitrary integer will be a non-integer. Who's going to correct the above, then? :-D :-D :-D
Guest squall Posted August 18, 2004 Report Posted August 18, 2004 superstar! Im just about to go to the exam... i will take it with me! Thanks!
Guest maxh2003 Posted August 18, 2004 Report Posted August 18, 2004 ...oh f***, I hope some of the above was right then... :shock: :oops: :)
Guest squall Posted August 18, 2004 Report Posted August 18, 2004 well the questions came up in the exam sure enough so you helped me out alot. you best get your ass to the next meet i owe you beer :P cheers mate :) Posted from my SmartPhone!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now