subject

You can generate a random number in c using the following code: int myrandomnumber; srand(time(null)); // seed the random number generator myrandomnumber = rand(); // each time you call this function there will be a different random number. generate a random number, and output it. use if statements to determine if the number is odd or even, and output a message to that effect. similarly, output if the number is divisible by 3, and if it is divisible by 10. use the % operator to achieve this. run the program, and print the results several times using different numbers to be sure that it’s working. hint: in c you can not declare variables after you write executable code. for example if you call the srand function, and then declare some more variables after that call, the program will not compile. the compiler messages are not very . put all the variable declarations at the top of the function.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
You know the right answer?
You can generate a random number in c using the following code: int myrandomnumber; srand(time(nul...
Questions
question
Mathematics, 13.01.2022 01:00
question
Mathematics, 13.01.2022 01:00