CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: Six sided cube

1. Junior Member
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. ## Re: Six sided cube

What code to you have so far?

3. Junior Member
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. ## 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. Junior Member
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. ## Re: Six sided cube

Originally Posted by philipeloka
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. ## 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...

8. Junior Member
Join Date
Oct 2013
Posts
4

## Re: Six sided cube

Originally Posted by AceInfinity
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
•

Click Here to Expand Forum to Full Width