1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Amiraneli [1.4K]
2 years ago
14

Write a program binary.cpp that reads a positive integer and prints all of its binary digits.

Computers and Technology
1 answer:
earnstyle [38]2 years ago
5 0

Answer:

View image below.

Explanation:

They're just asking you to create a num2bin function on Cpp.

If you search for "num2bin in C", you can find a bunch of answers for this if you think my solution is too confusing.

One way to do it is the way I did it in the picture.

Just copy that function and use it in your program. The rest you can do yourself.

You might be interested in
The possible states of a process are:
Oliga [24]

Answer:

a. new, running, waiting, ready, and terminated.

Explanation:

The process in a computer system can have different states and these are:

-New: When the process is created.

-Ready: When the process is waiting to be executed.

-Running: When the process is chosen to be executed.

-Waiting: When the process is expecting for something to happen.

-Terminated: When the process is not running anymore.

According to this, the answer is that the possible states of a process are: new, running, waiting, ready, and terminated.

3 0
3 years ago
Read 2 more answers
Why are duplicate tuples not allowed in a relation?
velikii [3]

Answer:

Explanation:

Duplicate tuples are not allowed in a relation because the specifications of the constraints of the regional integrity are violated, especially the main constraint that states that there can be no identical values for the attributes of two tuples at any database relation state.

Also, duplicate tuples are not allowed in a relation due to the fact that they lead to redundancy of the data base which in turn, slowing down the speed of the database when data processing such as inserting, querying, updating, deleting, etc are being performed.

4 0
3 years ago
Write a function analyze_text that receives a string as input. Your function should count the number of alphabetic characters (a
laiz [17]

Answer:

def analyze_text(sentence):

   count = 0

   e_count = 0

   for s in sentence:

       s = s.lower()

       if s.isalpha():

           count += 1

       if s == "e":

           e_count += 1

   return "The text contains " + str(count) + " alphabetic characters, of which " + str(e_count) + " (" + str(e_count*100/count) + "%) are ‘e’."

Explanation:

Create a function called analyze_text takes a string, sentence

Initialize the count and e_count variables as 0

Create a for loop that iterates through the sentence

Inside the loop, convert all letters to lowercase using lower() function. Check each character. If a character is a letter, increment the count by 1. If a character is "e", increment the e_count by 1.

Return the count and e_count in required format

5 0
3 years ago
Which is the best web development company in Pakistan?
andriy [413]

Answer:

Arbisoft is listed as the top cpmpany.

Explanation:

The top 5 are:

Arbisoft

Cygnis Media

Tintash

Square63

OneByte

4 0
2 years ago
A main reason careers in Information Technology are growing faster than average is
Scorpion4ik [409]
Technology has become such a major part of everyday life
8 0
3 years ago
Other questions:
  • Janelle is shopping for jeans from Express. She clicks on a style she likes. The site quickly presents her with a close-up view
    5·1 answer
  • What benefit does internet have​
    11·1 answer
  • A bus topology network is most often deployed as a peer-to-peer network. <br> a. True <br> b. False
    7·1 answer
  • Convert the following pseudi code to C++ code. BE sure to define the apprpriat evariables.
    9·1 answer
  • How can volunteering yo help plan fundraiser for your team or club be a way to develop your strengths?
    13·1 answer
  • Symbic Foods, a chain of fast food restaurants, has included a drop-down menu on its main Web site. With this drop-down menu, pe
    13·1 answer
  • The best place to start when you are looking for information about a device or an application is the ____ of the company that ma
    14·1 answer
  • Please discuss what you consider to be some of the biggest challenges your company will face when working from the Linux command
    14·1 answer
  • Mr. Stevens is the principal of a high school. Why might he want to export data from a database of students’ exam scores?
    14·2 answers
  • An important goal of biosecurity training is to: Prevent laboratory accidents that could expose personnel to hazardous agents. P
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!