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
IceJOKER [234]
3 years ago
6

How many bits would be needed to count all of the students in class today there is 20 students

Computers and Technology
1 answer:
Lady_Fox [76]3 years ago
6 0

Answer:

5

Explanation:

You might be interested in
ZeroIt is a function that takes one argument and returns no value. The argument is a pointer to int. The function stores the val
Sedbober [7]

Answer:

zeroIt(&x);

Explanation:

The statement that sets the value stored in x to zero by invoking the function zerolt is given below

zeroIt(&x);

The zeroIt function is also given below for better understanding.

void zeroIt(int *x) {

   *x = 0;

}

As seen, the function takes an argument with integer variable type, which is a pointer, denoted by the asterisk symbol (*x).

The ampersan sign (&x) is used to access the variable whose value can then be stored.

7 0
3 years ago
Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, s
Afina-wow [57]

The code is implemented based on the given operations.

Explanation:

#include <iostream>

#include <string>

using namespace std;

class dayType

{ private:

 string day[7];

 string presentDay;

 int numofDays;

public:

 void setDay(string freshDay);

 void printDay() const;

 int showDay(int &day);

 int nextDay(int day);

 int prevDay(int day) const;

 int calcDay(int day, int numofDays);    

 dayType()

 {

  day[0] = "Sunday";

  day[1] = "Monday";

  day[2] = "Tuesday";

  day[3] = "Wednesday";

  day[4] = "Thursday";

  day[5] = "Friday";

  day[6] = "Saturday";

  presentDay = day[0];

  numofDays = 0;

 };

 ~dayType();

};

#endif

#include "dayType.h"

void dayType::setDay(string freshDay)

{

  presentDay = freshDay;

}

void dayType::printDay()

{

  cout << "Day chosen is " << presentDay << endl;

}

int dayType::showDay(int& day)

{

  return day;

}

int dayType::nextDay(int day)

{

day = day++;

if (day > 6)

 day = day % 7;

switch (day)

{

case 0: cout << "The successive day is Sunday";

 break;

case 1: cout << "The successive day is Monday";

 break;

case 2: cout << "The successive day is Tuesday";

 break;

case 3: cout << "The successive day is Wednesday";

 break;

case 4: cout << "The successive day is Thursday";

 break;

case 5: cout << "The successive day is Friday";

 break;

case 6: cout << "The successive day is Saturday";

 break;

}

cout << endl;

return day;

}

 

int dayType::prevDay(int day)

{

day = day--;

switch (day)

{

case -1: cout << "The before day is Saturday.";

 break;

case 0: cout << "The before day is Saturday.";

 break;

case 1: cout << "The before day is Saturday.";

 break;

case 2: cout << "The before day is Saturday.";

 break;

case 3: cout << "The before day is Saturday.";

 break;

case 4: cout << "The before day is Saturday.";

 break;

case 5: cout << "The before day is Saturday.";

 break;

default: cout << "The before day is Saturday.";

}

cout << endl;

return day;

}

int dayType::calcDay(int addDays, int numofDays)

{

addDay = addDays + numofDays;

if (addDay > 6)

 addDay = addDay % 7;

switch(addDay)

{

case 0: cout << "The processed day is Sunday.";

 break;

case 1: cout << "The processedday is Monday.";

 break;

case 2: cout << "The processedday is Tuesday.";

 break;

case 3: cout << "The processedday is Wednesday.";

 break;

case 4: cout << "The processedday is Thursday.";

 break;

case 5: cout << "The processedday is Friday.";

 break;

case 6: cout << "The processedday is Saturday.";

 break;

default: cout << "Not valid choice.";

}

cout << endl;

return addDays;

}

4 0
2 years ago
3.5 lesson practice quiz Edhesive
erik [133]

Answer:

                                                                                     

Explanation:

6 0
2 years ago
Read 2 more answers
Which of the following best describes the difference between the domain and path of a URL?
Lana71 [14]

Answer:

the first choice

Explanation:

8 0
2 years ago
Individuals and IT professionals have a responsibility to be aware of security threats and the damage they might do.
Veseljchak [2.6K]
The answer is true they will have to be responsible
6 0
2 years ago
Other questions:
  • Which of the following typically have the highest auto insurance premiums?
    14·1 answer
  • Select the correct answer.
    12·2 answers
  • Availability is an essential part of ________ security, and user behavior analysis and application analysis provide the data nee
    14·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • Use the modulo operator (%) to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which
    8·1 answer
  • What term refers to the text label that describes each data series?
    9·1 answer
  • People, can anyone point me a highlighter for google chorme ?
    11·1 answer
  • Durante 10s, la velocidad de rotación y el momento de giro de las ruedas de un coche eléctrico son 100 rpm y 1405,92 Nm, respect
    15·1 answer
  • Lil fun question : burgers or pizza??
    6·2 answers
  • I need help about computer program. Solve C language code...... please​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!