Six sided cube
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Six sided cube

  1. #1
    Join Date
    Dec 2012
    Posts
    7

    Six sided cube

    Question1: Many role playing games required dice with a different number of faces than the traditional six-sided cube. Write a program that ask the user how many sides the die should have and give a random result in the appropriate range. Please help me with this i beg of you.

  2. #2
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    10,956

    Re: Six sided cube

    What code to you have so far?

  3. #3
    Join Date
    Dec 2012
    Posts
    7

    Re: Six sided cube

    I am teaching myself programming on C# my own and i joined this forum for assistance in case i come across any difficult problem i could be assisted please help me i don't have a foundation in it am a beginner. Help me i need all your assistance you could give please.

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    10,956

    Re: Six sided cube

    I am giving help. Are you able to create code for a simple console app? If you can, post what you have. If not, then forget this question and start by doing some online C# tutorials.

    We can help here, but we don't do homework for you.

  5. #5
    Join Date
    Dec 2012
    Posts
    7

    Re: Six sided cube

    No problem, thanks please give me a free online tutorial site for learning C#

  6. #6
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    10,956

    Re: Six sided cube

    Quote Originally Posted by philipeloka View Post
    No problem, thanks please give me a free online tutorial site for learning C#
    Do a search in bing or google for "free online C# tutorial".

  7. #7
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    51

    Re: Six sided cube

    Dice start at 1, the range would be 1 - {# of faces}. The Random class would be perfect for this, and if you look at some MSDN documentation for the usage of it's methods, declaring an instance, and choosing a method of displaying that returned result, it should take you no longer than a couple minutes to do this task...

    Microsoft MVP .NET Programming (2012 - Present)
    ®Crestron DMC-T Certified Automation Programmer

  8. #8
    Join Date
    Oct 2013
    Posts
    4

    Re: Six sided cube

    Quote Originally Posted by AceInfinity View Post
    Dice start at 1, the range would be 1 - {# of faces}. The Random class would be perfect for this, and if you look at some MSDN documentation for the usage of it's methods, declaring an instance, and choosing a method of displaying that returned result, it should take you no longer than a couple minutes to do this task...
    +1 to that, I am not far off from being a complete beginner and I managed to slap something together using that in about 20 minutes last night.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center