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
timurjin [86]
3 years ago
9

Which binary number is equivalent to the decimal number 104?

Computers and Technology
1 answer:
ra1l [238]3 years ago
6 0

B. 01101000

For future reference you can look up decimal to binary calculators online; or binary to decimal.

You might be interested in
I live in Pennsylvania which observes eastern standard time.
goldfiish [28.3K]

Answer:

mudar o horário de acordo com a vista

Explanation:

4 0
2 years ago
Weak Induction
slega [8]

Answer:

Following are the answer to this question:

Explanation:

In option 1:

The value of n is= 7, which is (base case)

\to 3^7

when n=k for the true condition:

\to 3^k

when n=k+1 it tests the value:

\to 3^{(k+1)}= 3^k,3\\\to < (k!) 3 \ substituting \ equation \\\to

since k>6  hence the value is KH>3 hence proved.

In option 2:

when:

for n=1:(base case)

\log(1!)

0<=0 \\ condition is true

when the above statement holds value n=1

when n=k

\log(k!)

when n=k+1

\log(k+1)!=\log(k!)+\log(k+1)\\

             

\because k \log k      [\therefore KH>K \Rightarrow  \log(KH>\loK)]

In option 3:

when n=1:

A_1 \cup B=A_1 \cup B\\\\

when n=k

\to (A_1\cap A_2 \cap.....A_k) \cup B\\=(A_1\cup B) \cap(A_2\cup B_2)....(A_k \capB).....(a)\\\to n= k+1\\ \to (A_1\cap A_2 \cap.....A_{kH}) \cup B= (A_1\cup B)\\\\\to  [(A_1\cap A_2 \cap.....A_{k}) \cup B]\cap (A_{KH}\cup B)\\\\\to  [(A_1\cup B) \cap (A_2 \cup B) \cap (A_3\cup B).....(A_k\cup B)\cap (A_{k+1} \cup B)\\\\  \ \ \ \ \ \ substituting \ equation \ a \\\\

hence n=k+1 is true.

7 0
3 years ago
One of your professors has asked you to write a program to grade her midterm exams, which consist of only 20 multiple-choice que
Lorico [155]

Answer:  

Here is the program that determines the number of questions that the student answered correctly.

#include <iostream>  //to use input output functions

#include <fstream>  // to handle files

#define size 20  //size of questions is fixed to 20

using namespace std;   //to identify objects cin cout

int correctAnswers(char answers[], char correct[]);  //to count correct answers given by student

   int main(){    //start of main function

       char correct[size];         // array stores correct answers

       char answers[size];       //stores answers of students

       int result;                     //stores the correct answers result of student

       double percentage;   //stores the percentage of correct answers

       int counter;        //counts number of correct answers given by student  

       ifstream reader("CorrectAnswers.txt");  //reads the contents of CorrectAnswers.txt file

       if(!reader){  //if file cannot be read/opened

           cout<<"Cannot open the file"<<endl; //displays error message

           return 0;        }          

       counter = 0;    //sets counter to 0 initially

       while( (reader>>correct[counter++]) && counter < size  );    //reads each answer from CorrectAnswers.txt  and stores it in char array correct[] at each iteration of while loop

       reader.close();  //closes the file

       reader.open("StudentAnswers.txt");    //opens StudentAnswers.txt file  

       if(!reader){   //if file could not be opened

           cout<<"Cannot open file"<<endl;   //displays this error message

           return 0;          }          

       counter = 0;    //sets counter to 0

       while( (reader>>answers[counter++]) && counter < size );   //reads each answer from StudentAnswers.txt  and stores it in char array answers[] at each iteration of while loop    

       result = correctAnswers(answers,correct);  //calls correctAnswers method to compute the correct answers given by student and stores the result of correct answers in result variable

       percentage = 100.0*result/size;   //computes percentage of correct answers of student    

       cout<<"The total number of questions answered correctly: "<<result<<endl;     //displays total no of qs answered correctly

       cout<<"The percentage of questions answered correctly: "<<percentage<<" %"<<endl;  //displays computed percentage

       if( percentage >= 75 ){  //if percentage of correctly answered questions is 75% or greater

           cout<<"Student has passed the exam!"<<endl;   } //displays that the student passed the exam

      else { //if percentage of correctly answered questions is below 75%

           cout<<"Student has failed the exam!"<<endl;         }  //displays that the student failed the exam

       return 0;     }  

   int correctAnswers(char answers[], char correct[]){   //method to compute the number of correct answers  

       int countCorrect = 0;   //stores the count of correct answers

       for(int i=0; i<size; i++){  //iterates 20 times to match answers from both the files of 20 questions

           if( answers[i] == correct[i] ){  // if the student answer in StudentAnswers.txt file matches with the correct answer given in CorrectAnswers.txt file

               countCorrect++;              }         }     //adds 1 to the countCorrect every time the student answer matches with the correct answer

       return countCorrect;     }  //returns the number of questions that the student answered correctly

Explanation:

The program is well explained in the comments mentioned with each line of code.

Here are the two files that can be used to check the working of the above program. You can create your own text files too.

     CorrectAnswers.txt :

A

A

B

D

C

C

A

C

D

D

A

B

A

B

B

C

A

C

C

B

StudentAnswers.txt

A

C

B

D

C

C

B

C

D

C

D

B

A

B

B

C

A

C

C

B      

Also if the number of wrong answers are to be displayed then add this method to the above code:

void wrongAnswers(char answers[], char correct[]){  //method takes two arrays one with correct answers and the other with student answers

       for(int i=0; i<size; i++){ //iterates 20 times

           if( answers[i] != correct[i] ){ //if the answer by student does not match with correct answer

               cout<<"Question Number: "<<i+1<<endl; //the question that is answered incorrectly

               cout<<"Correct answer is: "<<correct[i]<<endl;  //displays the correct answer

               cout<<"Student answer is: "<<answers[i]<<endl;    }    }    } //displays the answer that student gave

Now call this method in main() as:

if(result < size){  //if result is less than size i.e. 20

           cout<<"The questions answered incorrectly"<<endl;  //number of questions that are answered incorrectly

           wrongAnswers(answers,correct);  //calls method to compute the wrongly answered questions

       }else{  //if result is not less than size

           cout<<"No incorrect answers."<<endl;       }    //no questions incorrectly answered      

       cout<<"Number of missed questions: "<<size-result<<endl; //displays the number of missed questions

The screenshot of the output is attached.

8 0
3 years ago
Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
Taya2010 [7]

Answer:

Attached is a screenshot of my code for 'PasswordGenerator' and the tests necessary.

Explanation:

If you need any explanation, please ask!

3 0
3 years ago
Read 2 more answers
Social media applications' main purpose is to allow users to watch movies and TV shows, listen to music, and read books online.
Novosadov [1.4K]

Answer: I dont really know but im guessing it depends on the type of assignment you have. im thinking True.

Explanation:

4 0
3 years ago
Other questions:
  • A hub or ____ is a central point that connects several devices in a network together.
    11·1 answer
  • Internet is for everyone but it wont be if its users cannot protect their privacy and the confidentiality of transactions conduc
    6·1 answer
  • You’re configuring a Web-based intranet application on the WebApp server, which is a domain member. Users authenticate to the We
    13·1 answer
  • The Binder Prime Company wants to recognize the employee who sold the most of its products during a specified period. Write a qu
    12·1 answer
  • Professional communication must be objective,
    8·1 answer
  • Which type of programming language translates one line of code at a time and then executes it before moving to the next line?
    5·2 answers
  • Which of the following is NOT a function of a Web Browser?
    9·1 answer
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
  • Yusuke has been a fan of online games for as long as she can remember. She particularly loves the role-playing games that allow
    7·1 answer
  • A natural language processor comes across a sentence that contains the word “weightless.” The morphology component identifies th
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!