1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

c++ hw help

Discussion in 'Programming' started by Green Drank, Jan 31, 2017.

  1. i may or may not be currently ignoring some rules

    i need help regarding my c++ homework in high school, i have a quiz tomorrow and i'm still oblivious to figuring out how to correctly do this:

    7. Write a statement that stores the value of true if the variable k is in not in the range 5 to 15 in the variable m.
    8. Write a statement that stores the value of false if the variable j is not in the range 5 to 15 in the variable k.

    im in a coding class in highschool that teaches python3 - c++ - c#... so far we are learning very basic concepts on how to write programs and store data... as well as inputting and outputting stuffs. who ever helps me will get a big kiss on the cheek :)
     
    • Good Coder Good Coder x 1
  2. RJ

    RJ no pay Legend Clockwork Customer

    The tasks are a bit convuluted only because of the grammar. I think these are what the tasks are actually asking:
    7. Write a statement that stores the boolean value of 'true' in the variable 'm' if the variable 'k' is within the range of 5 to 15.

    8. Write a statement that stores the boolean value of 'false' in the variable 'k' if the variable 'j' is not within the range of 5 to 15.

    They're very similar tasks, they're just using different variables and different conditions. Simply put: 7 is true if the value is within the range, 8 is false if the value is outside the range.

    I hope this helps you a bit, let me know if you need more help and maybe paste your code here showing what you've tried so far.

    Edit: Also I may be a bit too late to help out. :v
     
    • Friendly Friendly x 1
    Last edited: Jan 31, 2017
  3. all good, figured it out... thanks for replying though.

    #7) m=(k<=5 || k>=15)

    if a forum booberator stumbles across this post, you are welcome to lock this thread.
     
  4. cash wednesday

    cash wednesday Owner of UNDERWORLD™ GAMING Clockwork Customer Active Member

    Last edited: Feb 1, 2017
  5. RJ

    RJ no pay Legend Clockwork Customer

    That code you shared checks if the value is outside of the range of 5-15, which I believe question 7 wasn't asking. You may want to ask your teacher about this part in question 7: "is in not in." Reason being that it's confusing.

    Unless your teacher said that what you posted was the answer, then oh well. ¯\_(ツ)_/¯
     
  6. eh, got an 83% on the test which is fine with me, apparently that answer is correct so :/
     
    • Like Like x 1
  7. RJ

    RJ no pay Legend Clockwork Customer

    Good job, keep up the good work. :)

    Not too sure what to say about that question though... :S
     

Previous Readers (Total: 0)