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
Tcecarenko [31]
4 years ago
11

Given the variables costOfBusRental and maxBusRiders of type int , write an expression corresponding to the cost per rider (assu

ming the bus is full). (Do not worry about any fractional part of the expression-- let integer arithmetic, with truncation, act here.)
Computers and Technology
1 answer:
Liono4ka [1.6K]4 years ago
7 0

Answer:

       int costOfBusRental;

       int maxBusRiders;

       int costPerRider;

       costPerRider = costOfBusRental/maxBusRiders;

Explanation:

The costPerRider is the total cost of renting the bus (costofBusRental) divided by all the bus users (maxBusRiders). So we declare the three variables to be of type int as required by the question.

You might be interested in
_________function tells the cin object to skip one or more characters in the keyboard buffer.
Amanda [17]

Answer:

cin.ignore function written as  cin.ignore()

Explanation:

  • As we know that cin is an object that is used to obtain the input entered by the user through the keyboard.
  • cin.ignore() is a function which is used to ignore or skip one or more characters in the keyboard buffer.
  • Keyboard buffer is a small storage area which is used to store keystrokes.
  • When a key is pressed on the keyboard it is referred to as a keystroke.
  • So before processing, these keystrokes are stored in keyboard buffer.
  • So when we use cin to input a character from the user through the keyboard, the keyboard buffer must be empty. If that's not done then the character entered will be taken by the buffer of previous variable.
  • Lets take an example of why we want to use cin.ignore() function.
  • For example you want the employee (user) to enter his name and you are using cin to read this name from the user.

                                          char empname[8];

                                           cin>>empname;

  • Now if the user types his name lets say Anonymous and press enter key this will be taken as new line character and it will store this newline character \n into the buffer.
  • cin >> statement reads data from the buffer and stops reading when it reaches newline character.
  • So Anonymous is read in and stored in empname variable but newline character is left in the keyboard buffer.                          
  • Lets say after cin>>empname we write another statement that takes a character from user. A user wants to enter character "a".

                                char character;

                            character = cin.get();

  • When cin.get finds the newline  character \n in keyboard buffer, it uses it (as cin.get can read the newline character in the buffer) without waiting for the  user to input "a".
  • So cin.ignore() function is used to avoid such situation.
  • We can specify the characters to be ignore within the cin.ignore() function such as cin.ignore(10,'\n') will ignore 10 characters in the buffer before taking new line or until a \n character comes.
  • You can simply use cin.ignore() which will ignore the very next character just as \n in our example. In our example we can use cin.ignore() after the cin>>empname; and before using cin.get();
8 0
4 years ago
Write a paragraph on the importance of backing up data and mention at least three ways to back up data from your computer.
Scrat [10]

Answer:

Data backup is probably the most important part of any IT system. Backing up your data means periodically saving a copy of your computer’s information to an offsite location for safe keeping. Having a copy of your computer’s data protects it from being lost in the event of a hard drive failure

Explanation:

1-     On a Hard Drive (Onsite Backup)

2-     Online Backup Services (Offsite Backup)

3-     Cloud Backup Services (Offsite Backup)

5 0
4 years ago
Which is true about POP3 and IMAP for incoming email?
Novay_Z [31]

Answer:

Both keep email on an email server by default

Explanation:

IMAP synchronises emails, while POP3 downloads them for offline use.

7 0
3 years ago
____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
aleksley [76]

Answer: Spread spectrum

Explanation:

In spread spectrum the data to be transmitted is spread over a wider bandwidth rather than fixed bandwidth.

4 0
4 years ago
Which language would you use to create scripts that send data to a web server?
bonufazy [111]

Which language would you use to create scripts that send data to a web server?

A. HTML

<u>B. ASP</u>

C. SGML

D. CSS

5 0
4 years ago
Read 2 more answers
Other questions:
  • Find meanings for the words and give examples where you can<br><br> WORTH 30 points
    12·1 answer
  • The c++ operator _______________ is used to destroy dynamic variables.
    5·1 answer
  • According to Fourman, Informatics is _______________ with a very _____________ scope.
    5·2 answers
  • Purpose of this program:
    12·1 answer
  • javascript Write a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment
    7·1 answer
  • Is the color grade of black or white higher?
    11·2 answers
  • In order to send a photo in a text message from your cell phone to your cousin's cell phone who lives in New Zealand, is it nece
    8·1 answer
  • LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will prin
    9·1 answer
  • What is artificial Intelligence ?
    11·2 answers
  • A thesis statement is the last sentence of the conclusion. It summarizes the entire paper.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!