Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Help needed!!

Help needed!!

Scheduled Pinned Locked Moved Managed C++/CLI
helpc++question
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shekkk
    wrote on last edited by
    #1

    Hi, I am a silent member of the group. I have a question and I would like to know the logic behind the development of the program... The question is as follows: There are 4 cowboys each wearing a hat which can be of two colours: Green and red. There is a sheriff whose pocket is full of coins. When the sheriff takes out a coin from his pocket, the cowboys changed their hat from one colour to another. The problem is to write a c++ or a c code to find those cowboys who are wearing the same colour hat at any moment... If someone can develop the program , I would be grateful... shekkk.:confused:

    B 1 Reply Last reply
    0
    • S shekkk

      Hi, I am a silent member of the group. I have a question and I would like to know the logic behind the development of the program... The question is as follows: There are 4 cowboys each wearing a hat which can be of two colours: Green and red. There is a sheriff whose pocket is full of coins. When the sheriff takes out a coin from his pocket, the cowboys changed their hat from one colour to another. The problem is to write a c++ or a c code to find those cowboys who are wearing the same colour hat at any moment... If someone can develop the program , I would be grateful... shekkk.:confused:

      B Offline
      B Offline
      Bob X
      wrote on last edited by
      #2

      shekkk wrote:

      The problem is to write a c++ or a c code to find those cowboys who are wearing the same colour hat at any moment...

      Number of the coin out of the pocket % 2; if(result == 0) wearing origional hats else wearing other colour hats

      J 1 Reply Last reply
      0
      • B Bob X

        shekkk wrote:

        The problem is to write a c++ or a c code to find those cowboys who are wearing the same colour hat at any moment...

        Number of the coin out of the pocket % 2; if(result == 0) wearing origional hats else wearing other colour hats

        J Offline
        J Offline
        Jonathan Darka
        wrote on last edited by
        #3

        I am surprised that you don't mind doing someone else's homework ?


        Darka [Xanya]

        S 1 Reply Last reply
        0
        • J Jonathan Darka

          I am surprised that you don't mind doing someone else's homework ?


          Darka [Xanya]

          S Offline
          S Offline
          shekkk
          wrote on last edited by
          #4

          So you mind a lot...huh. I think you don't know anything at all..

          J 1 Reply Last reply
          0
          • S shekkk

            So you mind a lot...huh. I think you don't know anything at all..

            J Offline
            J Offline
            Jonathan Darka
            wrote on last edited by
            #5

            You're the one who cannot do a simple homework question, we are mostly professional developers here - clearly you are not, maybe you should stick to an easier profession if you cannot do your own homework, maybe be a cleaner or something better suited to you skills (or lack of them). We are more than happy to help those that at least try to solve the problem themselves, not completely lazy people like you.


            Darka [Xanya] "When you're taught to love everyone, to love your enemies, then what value does that place on love?"

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups