good day to all!
i have a project all about color guess game.
i just want to learn about using random functions in words because usually i only see random numbers.
anyone can help me to create a source code that will randomize words? thank you! turbo c only.
my professor told me to use turbo c only, please help me on how to make a source code of like a color guessing game, i will input a color and the computer will randomly choose a color(but only red, blue, green, white, pink and yellow). hope you can help thank you!
I still don't see a question. All we can do with the info you gave us is write it for you. That's not how we work here. What problems are you having? What have you tried? What don't you understand?
And, just so you know, your professor is 30 years out of touch with programming. He's forcing you to use the equivalent of spears when the rest of the world uses lasers. He's teaching you something you'll never use in the real world.
i just need a super simple and basic codes :) thanks
Ahh, I see. You do want us to write it for you. Sorry, not going to happen. We don't get the grade and you won't deserve it. And what would your professor say when he finds out?
no i dont need the whole code, i tried to use randomizing in words but it won't work so i just want to learn to use it in words and i tried to research but they are using other compilers already, i just want to know how to use randomize in words?
the only randomizing funtion for C I know is exclusive for integers only.
What you could do is create and store the words in an array or file then use the rand function to generate a number, the word whose index matches the number will be retrieved
even i will just use the colors? not the colors but the words red,blue,green,yellow,white,pink only
if those are the only words you'd need then it's more easy to store them in an array and using the rand() function to generate a number, check the word whose index matches the generated number and retrieve it
can i assign an integer value to a word in turbo c?
example for blue=1 then red=2 green=3 yellow=4 white=5 pink=6? then i will randomize from 1 to 6 only then if the output is 1 then it will show blue. can i do that?
there are 2 ways I can think of right now to do this:
the first is similar to the examples I gave you using arrays or conditions but instead of using words you's use characters
next is printing the ascii equivalent of the generated number with the scope of the starting and ending character ascii values
ex. of the latter
int generatednumber = 97;
Hello, I would like to make a suggestion with regards to randomising words about colours. Sorry I cannot suggest a programme, as I dont have any idea of programming that most of you do, because my field is Subtle Energy, however, I too wanted a Random Generator for words. I found one on the internet which you can use, to try out your theory on colour. You will find it on Random.Org it is called a List Generator, however, there is a restriction as to how many tries you have a day. Type in all the words you require, if you need a number with them, type them in after the name, because they initially use this True Random Generator on numbers, however the name doesnt make any difference. I am using 300 words or sentences, it will select each one in order of randomness. If you need these colours for a specific purpose, then contact me, I can help you with that.