PDA

View Full Version : C programming


sicko1
June 2nd, 2009, 04:03 AM
Hello ! Im new in linux programming, if you please help solve this problem!

UNI Gaming Games d.o.o. N possession of slot machines. For one avtomat may be only one student. In the casino there to play M students, each student plays between 0 and max seconds. If all gaming machines are busy, the student "appeal" (display screen) and leave the casino. Write a program igralnica.c, which will be a simulated casino.

Tips:

-Slot machines can present with count display.
-Playing simulate with funciton sleep().
-Processes at inlet are NO blocked -> see the traffic light flags.
-Father creates m HORIZONTAL processes, and set a random time to play (with the help of the functions rand ()),
- For each sign the transition process between states in terms of: student x is acquired machine, x is a student left the machine, student x: playroom is full of it go,
- Remember to wait for all the sons and delete traffic light.

lisati
June 2nd, 2009, 04:11 AM
We don't normally do homework for people here on the forums, but can sometimes provide advice or hints if you get stuck.

ad_267
June 2nd, 2009, 04:12 AM
No one is going to do your homework for you, ask some specific questions if you have any.

diafanos
June 2nd, 2009, 05:56 AM
Don't worry. You don't need to be good at linux programming to implement this program. Being good just at C programming, it's sufficient!

Lars Noodén
June 2nd, 2009, 06:04 AM
Start with the text editor, Kate, and use the terminal window to test your code in gcc.

gnuman
June 2nd, 2009, 04:17 PM
Start with the text editor, Kate, and use the terminal window to test your code in gcc.

No, use VIM!

;)

JasonOne
June 6th, 2009, 05:24 AM
you can't learn on anything unless you're gonna try it yourself. you can ask questions but you can't always rely unto someone to do it for you.

hanseldansel
June 6th, 2009, 12:53 PM
indeed I also recommend using vim. However choose an editor and a compiler as you need them. Then start programming and solve problems step by step allowing asking precise questions.
Nobody will do your "work" for you.

Cheers!
Daniel