Computers and Technology
Computers and Technology, 28.11.2019 21:31, aaron2113

Convert to binary - functions write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. for an integer x, the algorithm is: as long as x is greater than 0 output x % 2 (remainder is either 0 or 1) x = x / 2 note: the above algorithm outputs the 0's and 1's in reverse order. you will need to write a second function to reverse the string. ex: if the input is 6, the output is: 110 your program must define and call the following two functions. the integertoreversebinary function should return a string of 1's and 0's representing the integer in binary (in reverse). the reversestring function should return a string representing the input string in reverse. string integertoreversebinary(int integervalue) string reversestring(string userstring) note: this is a lab from a previous chapter that now requires the use of a function.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, mitchellk872
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, bbysl15
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
image
Computers and Technology, 23.06.2019 10:00, karissanichole18
Install and use wireshark program ( send back screen shots and other vital information) case project 3-2: decode a tcp segment in a wireshark capture in this chapter, you walked through tcp segment to interpret the data included in its header. in this project, you use wireshark to capture your own http messafes, examine the tcp headers, and practice interpreting the data you'll find there. 1. open wireshark and snap the window to one side of your screen. open a browser and snap that window to the other side of your screen so you can see both windows.
Answers: 2
image
Computers and Technology, 24.06.2019 15:00, marelinatalia2000
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
Do you know the correct answer?
Convert to binary - functions write a program that takes in a positive integer as input, and outputs...

Questions in other subjects: