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
riadik2000 [5.3K]
3 years ago
8

What is the simplest way to convert a decimal number in a binar one in c++?

Computers and Technology
1 answer:
Fiesta28 [93]3 years ago
4 0
It's easy you need to use function for decimal in binary.
binary STD;
int STD_no;
STD=STD_No.ToBinary

You might be interested in
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
3 years ago
Read 2 more answers
What is the basic purpose of Google calendar?
goldenfox [79]
The basic purpose of a google calendar is basically the same as a regular calendar. it is used to keep track life's important events all in one place.    
7 0
3 years ago
Read 2 more answers
This isn't a homework question but rather a technological problem. I connected my device to the motherboard but it will not dete
Helen [10]
Re start the computer again
5 0
3 years ago
Read 2 more answers
When a formula contains the address of a cell, it is called a(n)
Shalnov [3]
When a formula contains the address of a cell, it is called a c<span>ell reference.

hope this helps!</span>
8 0
3 years ago
Telepresence provides the opportunity for people to work from home and attend virtually. True False
ira [324]
The answer is true.
Telepresence is essentially things like video-chat that allows people to participate in meetings even if they are not physically present.

I hope this helps! :)
~ erudite 
7 0
3 years ago
Read 2 more answers
Other questions:
  • In codd's model of a relational database, data is stored in a(n) _____, which maintains information about a(
    7·1 answer
  • Sending a employee an email with important criticism represents a problem which communication process
    9·1 answer
  • Define a function that takes two arguments: a string called strText and a number called intNumber. This function will use a repe
    12·2 answers
  • What will be result of below if statement.
    13·1 answer
  • Explain the paging concept and main disadvantages of pipelined
    15·1 answer
  • What are the origins of the parking barrier?
    12·1 answer
  • What effect would excluding quotation marks from a search phrase have?
    12·1 answer
  • why does planets orbit the sun? asap i give brainlist i know it on that subject i dont know what else goes with it
    10·1 answer
  • Question 1 (3 points)
    6·2 answers
  • 5. An external CSS file is saved with D. Answer the following questions. 1. Explain the purpose and advantages of using CSS.​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!