subject

This program will get you used to retrieving a value from a function. The function should be named getRandomNumber. The function should return a single random integer from 1 to 100. From within main, you will declare an integer variable named rnd. Then you will assign a value into rnd from the getRandomNumber function. After you have done this, you will use a printf and show the random number that was returned. The prograrm should be named GetRandom--don't forget to rename main. c to GetRandom. c before turning in. In this program you will create a function that returns PI. The function should be named getPI that returns a float. From within main, declare a float named myPI. Assign myPI from the getPI function. Then use printf to show the value that you got.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
3. (6 pts) internally in the computer, with few exceptions, all numerical computation is done using binary numbers. output, however, often uses ascii, which is formed by appending 011 to the left of a bcd code. thus, an algorithm that directly converts a binary integer to a bcd integer is very useful. here is one such algorithm 1) draw lines to the left of the binary number to bound the expected bcd decades. (each decade is a group of 4 bits.) move the binary number one bit to the left. add 0011 to each bcd decade containing a binary value> 0100 repeat steps 2-3 until the last bit in the binary number has been moved into the least significant decade position. (note that when the last bit has been shifted into bcd decade, step 3 is not repeated.) read the bcd result. 2) 3) 4) 5) a) execute the algorithm for the binary number 1101101 b) execute the algorithm for the binary number 01110101110 4. (4 pts) represent the decimal number 3568 in bcd; excess-3 code; ascil; and hex.
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
You know the right answer?
This program will get you used to retrieving a value from a function. The function should be named g...
Questions
question
Mathematics, 01.04.2021 17:50
question
English, 01.04.2021 17:50
question
Mathematics, 01.04.2021 17:50
question
Mathematics, 01.04.2021 17:50
question
English, 01.04.2021 17:50
question
English, 01.04.2021 17:50
Questions on the website: 13722362