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
ipn [44]
3 years ago
14

Write statements that output variable numComputers as follows. End with a newline

Computers and Technology
1 answer:
gavmur [86]3 years ago
8 0

Complete Question:

Write statements that output variable numComputers as follows. End with a newline. There are 10 computers.

#include <iostream>

using namespace std;

int main()

{

int numComputers;

cin >> numComputers; // Program will be tested with values: 10.

...

return 0;

}

Answer:

cout << "There are ";

cout << numComputers;

cout << " computers." << "\n";

Explanation:

Using three cout statements the string "There are 10 computers." is printed out, notice that the variable numComputers is entered by the user when the program is run. Another way of concatenating an integer variable and string for printout is by the use of the + (plus) operator.

You might be interested in
How to write a program converting RGB to CMYK in python
Arisa [49]

rgb_scale = 255

cmyk_scale = 100

def rgb_to_cmyk(r,g,b):

if (r == 0) and (g == 0) and (b == 0):

return 0, 0, 0, cmyk_scale

# rgb [0,255] -> cmy [0,1]

c = 1 - r / float(rgb_scale)

m = 1 - g / float(rgb_scale)

y = 1 - b / float(rgb_scale)

min_cmy = min(c, m, y)

c = (c - min_cmy)

m = (m - min_cmy)

y = (y - min_cmy)

k = min_cmy

return c*cmyk_scale, m*cmyk_scale, y*cmyk_scale, k*cmyk_scale

def cmyk_to_rgb(c,m,y,k):

r = rgb_scale*(1.0-(c+k)/float(cmyk_scale))

g = rgb_scale*(1.0-(m+k)/float(cmyk_scale))

b = rgb_scale*(1.0-(y+k)/float(cmyk_scale))

return r,g,b

5 0
3 years ago
Question 2 (2 points)
bezimeni [28]

You can add a bookmark by clicking the star icon

<u>Explanation:</u>

Sometime you may have to visit a same page many times. It will be very difficult to search every time and go to the same page. It will be waste of time. Hence, there is an option available so that you can visit the page that you want to access many time without wasting your time.

In order to visit the page that you want to access more frequently you can use two ways. Most of the browsers will support to visit the most frequently accessed websites using the keyboard shortcuts Ctrl+D. You can also click on the star icon that is present in the address bar of the browser's top portion.

3 0
3 years ago
Write a java code to print Multiplication Table Till 20
Ket [755]

Explanation:

Do not disturb me everyone

8 0
3 years ago
Read 2 more answers
WILL UPVOTE NEED ANSWERS ASAP i have till 4:30
deff fn [24]
B. Summer monsoons bring heavy rainfall and winter monsoons create dry and arid conditions.
6 0
4 years ago
You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experime
murzikaleks [220]

Answer:

Explanation:

Attached is the solution

3 0
3 years ago
Other questions:
  • Which command is used to combine two or more cells together into one cell?
    14·2 answers
  • Programming Using OOJAVA<br> check this Atterchment and solve Exascies 1, 2, and 3
    10·1 answer
  • In an AND truth table.
    7·1 answer
  • Which type of image uses lossy compression to reduce file size?
    14·1 answer
  • The Python print function
    9·1 answer
  • You want to calculate a bonus if the sold price was at least equal to the listing price, and if the house sold within 30 days af
    6·1 answer
  • Define the instance method inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids. Sample output for th
    6·1 answer
  • Some one help pls will mark brainless !!!!!
    13·1 answer
  • Write a program that asks the user to enter a positive integer that represents a number in the decimal system and then displays
    12·1 answer
  • (lesson 7.9: acceptance-rejection --- continuous examples.) consider the constant . on average, how many iterations (trials) wil
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!