Shop Mobile More Submit  Join Login

Details

Closed to new replies
December 8, 2012
Link

Statistics

Replies: 15

Fix My c++ Program- Get a Half Body Drawing

:iconkuru-sann:
Kuru-sann Featured By Owner Dec 8, 2012  Student Digital Artist
I'm desperate. I'm doing a c++ program which involves a lesson that hasn't been taught to us yet -vectors. (I also used arrays but I couldn't do it right)Online tutorials in vectors were not much of a help too :(

I never really ask for help in assignments like this but none in my family/friends can even help me with my programming stuffs so I hope you will. I also searched online but no luck

-------------------------------------------------------------
A party game has N party guests sitting in a circle on chairs numbered,in a clockwise direction, one to N. A cup of beverageis passed from person to person around the circle in a clockwisedirection, starting with the person sitting on chair numberone. Every person has a drink from the cup before passing it on. Regardless of how many are sitting in the circle, after every 17th person has a drink he is then eliminated from the circle and does not drink again. The next person becomes number one and the process repeats itself. Thus the number of people in the circle reduces. People sit on the same chair for the entire game. Sam and Sally are very fond of the beverage being served and want as much of it as possible. To do this they want to be the last two to be eliminated from the circle.
Write a program that tells us:
(1) the sequence, by chair numbers, of elimination from the circle,
(2) the chair numbers that Sam and Sally should sit on to be the last pair left.
Your output should be in the form:
SEQUENCE OF ELIMINATION _,_,_,_,_,_,_,_,_,_,_,_,_,_.
THUS THE BEST SEATS FOR SAM AND SALLY ARE _,_.

------------------------------------------------------------

Now, I don't want you to do the whole program for me;; ^^; Maybe just correct the program I did(and maybe explain how you did it so I can learn and not just get my assignment done)

My program: [link]

I'm willing to draw a half-body picture of any character of your choice for anyone who'll be able to help me >.<; I'm sorry but that's the only thing I can offer now
Reply

You can no longer comment on this thread as it was closed due to no activity for a month.

Devious Comments

:iconpyrohmstr:
pyrohmstr Featured By Owner Dec 8, 2012  Professional Artist
Wow, I forgot DA doesn't like code. Here is a pastebin: [link]

Also, for future reference, using pastebin for code is better than a mediafire download :)
Reply
:iconkuru-sann:
Kuru-sann Featured By Owner Dec 8, 2012  Student Digital Artist
I see. I shall take note of pastebin :D

Thank you very much :iconsobbplz: You're definitely a life saver! I think you're very amazing to fix the program without any experience with c++ before!

:icontouchedplz: I'll study this fixed program until I finally get how it was done ;v;

Now I'm not sure if you like the way I draw or not, but I feel really obliged to draw something for you ;v; I'm very sorry but it's all I can offer for now and I just really really need to repay you.

:iconcryforeverplz:
Reply
:iconshininginthedarkness:
shininginthedarkness Featured By Owner Dec 9, 2012
Psssst draw *pyrohmstr an owl. Just trust me.
Reply
:iconkuru-sann:
Kuru-sann Featured By Owner Dec 9, 2012  Student Digital Artist
An owl? :o what kind?
Reply
:iconshininginthedarkness:
shininginthedarkness Featured By Owner Dec 9, 2012
Hmm.. you know, I don't think he's too picky as to the type. Draw an owl in a fashion that pleases you, and then note him the link.
Reply
:iconkuru-sann:
Kuru-sann Featured By Owner Dec 9, 2012  Student Digital Artist
hmm alright then :o I hope this is not a prank or anything >.<; I wouldn't want to make him angry at all since he helped me :o
Reply
:iconshininginthedarkness:
shininginthedarkness Featured By Owner Dec 9, 2012
No, it's not :lol: Actually I haven't seen him around for a while and wanted to do something nice for him vicariously. You can say it was my idea if you feel more comfortable.
Reply
:iconkuru-sann:
Kuru-sann Featured By Owner Dec 12, 2012  Student Digital Artist
alright I shall draw it and tell him that it was your idea :D thanks!
Reply
:iconpyrohmstr:
pyrohmstr Featured By Owner Dec 9, 2012  Professional Artist
:heart:
Reply
:iconpyrohmstr:
pyrohmstr Featured By Owner Dec 9, 2012  Professional Artist
don't worry about payment or anything :)

Also, you should verify that the program actually works. I tried it for 5 seats, 6 seats, and 17 seats on paper to verify but that's hardly an exhaustive test :p
Reply
Add a Comment: