• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Banking with Threads

 
Urs Waefler
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must solve the following task: There are 2 persons in a bank. 1 Person puts the amount x to an account, the other person withdraws the same amount at the same time from the same account. This is my code so far:



It must be improved. In general it seems to go in the right direction, nevertheless it is not good. Who can help me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic