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
Annabella was giving a presentation to a group of 20 real estate agents on
podryga [215]

Anticipate questions.

3 0
3 years ago
Read 2 more answers
What is the maximum amount that OSHA can impose as a penalty on an employer for each Willful violation?
RSB [31]
To be honest bro, i really don't know the answer
7 0
4 years ago
What function can be used to detect when the end of an input file has been reached?
il63 [147K]

Answer:

getc() or feof() in c/c++.

Explanation:

getc() returns EOF(End of File) when the end of the file reached is reached but it is not efficient because it also return EOF when it fails.

feof() returns non-zero value when the EOF is reached otherwise it return 0.So feof() is an efficient method to read a file.

For example:-

#include <stdio.h>    

int main()  

{  

 FILE *f = fopen("sample.txt", "r");  

 int c = getc(f);  

 while (c!= EOF)  

 {  

    putchar(ch);  

   ch = getc(f);  

 }  

 if (feof(f))  

    printf("\n File has ended.");  

 else  

    printf("\n Reading not happened.");  

 fclose(f);

 getchar();  

 return 0;  

}

7 0
3 years ago
______ is/are artwork available for computer documents that include artwork such as drawings or stock photography. Online pictur
Goshia [24]

I believe these are known as Online Pictures.

6 0
3 years ago
Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
tia_tia [17]

In the program While loop is used. In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum. The inputs and corresponding outputs are written in the explanation.

<u>Explanation</u>:

In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum.

import java.util.Scanner;  

public class NonNegativeLooper

public static void main (String [] args)

Scanner scnr = new Scanner(System.in);  

//initialize the userNum with 9

int userNum = 9;

//Repeat the loop until the userNum is not negative

while (userNum>=0)

System.out.println(Body);

//Prompt the user to enter the usrNum again

userNum = scnr.nextInt();

System.out.println(Done.);

return;

4 0
3 years ago
Other questions:
  • What does CPC stand for?
    6·2 answers
  • In addition to meeting OSHA standards, the Department of Defense requires each military department, including the Department of
    12·1 answer
  • business ethics chapter 7 jordan, a software engineer, is responsible for maintaining the private piece of his company's interne
    15·1 answer
  • When you use your fingerprint on a reader attached to your computer to authenticate yourself as the legitimate computer user, wh
    6·1 answer
  • Which statement regarding socializers is true?
    10·2 answers
  • _____ is an instruction for a computer to perform a specific task.
    14·1 answer
  • Menus are attached to the windows by calling
    15·1 answer
  • Anyone else like hunter x hunter?<br> lets talk abt it uwu<br><br> good day :)
    14·2 answers
  • Determine the lines that refer to specialty accommodation.
    5·1 answer
  • Why do we need to use a VPN service?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!