Reference no: EM13161144
Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example
Guess a number between 0 and 10
user: 9
Too high!
Guess a number between 0 and 10
user:2
Too low!
Guess a number between 0 and 10
user: 5
You win!
The number must be randomly generated each game, the following function will yield a random number between 1 and 100000:
int randNum()
{
int i
time_t t1;
(void)time(&t1);
lrand48((long)t1); /*use time in seconds to set seed*/
return lrand48()/20000;
/*lrand48() returns non-negative long integers uniformly distributed over the interval (0~100000)*/
}
where libraries sys/types.h and time.h should be included.
requirments:
The game must include at least three difficulties(bonus: add a custom difficulty so the user can define the high number), should tell you how many guesses it took to get it, must use a loop, and a switch statement. The game must also look nice.
Modify each sorting algorithm
: Modify each sorting algorithm so that it keeps track of the number of comparisons it performs and the number of exchanges (swaps) it performs during a single sorting operation. Keep track of these numbers using two long integer counters
|
Compute the equilibrium pressure of n2o4
: calculate the equilibrium pressure of N2O4(g) and NO2(g). (c) What percentage (by moles) of the original N2O4(g) is dissociated at the new equilibrium position (total pressure = 1.00 atm)?
|
What would be the effect on co2 production
: I'm looked everywhere including my text and I can't seem to figurething one out. If someone can please explain this so I have abetter understanding I would greatly appreciate it.
|
What is the fertilized egg cell called after the sperm
: What is the fertilized egg cell called after the sperm enters it and it attaches to the tissue in the uterus?
|
Make a game in which you guess a number
: Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example
|
Write equations for the chemical reactions
: write equations for the chemical reactions that occurred between the aqueous solutions of the oxides of sulfur and calcium and between the aqueous solutions
|
How often would an 8-base cutter cleave
: The haploid genome contains about 3*10^9 nucleotides. On average, how many DNA fragments would be produced if this DNA was digested with restriction enzyme PstI (a 6-base cutter)? RsaI (a 4-base cutter?) How often would an 8-base cutter cleave?
|
State the reaction vessel feels cooler
: The reaction vessel feels cooler. b.The value of K becomes smaller. c.The equilibrium will shift to the left. d.The reaction vessel feels warmer.
|
Given an array with 100,000 entries to sort
: Sorting given an array with 100,000 entries to sort. Under what circumstances would you use each of the following: insertion sort,mergesort'quicksort
|