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
Makovka662 [10]
3 years ago
9

Two variables, num and cost have been declared and given values: num is an integer and cost is a double. Write a single statemen

t that outputs num and cost to standard output. Print both values (num first, then cost), separated by a space on a single line that is terminated with a newline character. Do not output any thing else.
Computers and Technology
1 answer:
sweet [91]3 years ago
3 0

// Writing a C++ Program for the given senario

#include<iostream>         // Using input and output stream

using namespace std;       // Using standard namespace

// Main function

int main(){

int num = 10;             // int num initialized with 10

double cost =1000;       // double cost initialized with 1000

/*

Cout is stream in C++ that uses << symbol to output anything on the screen and as the problem says we need to output both numbers on a line, i have used multiple << because on cout streams you are allowed to send one element at a time.

Also, endl is a keyword in C++ that ends the line after output for the cout stream is finished.

*/

cout<< num << " " << cost <<endl;

// Return 0 means telling the compiler to terminate the //program

return 0;

}

You might be interested in
Who designed the apple i computer in 1976?
guajiro [1.7K]

Steve jobs designed the first apple computer


6 0
3 years ago
Read 2 more answers
Parts are described by partnum, color, and price. Parts can be subassemblies as well and this means that they contain other part
sladkih [1.3K]

Answer:

Attached is the solution:

5 0
3 years ago
The components of hardware include:
zlopas [31]

Answer:

A

Explanation:

Monitor, CPU, Disk Drives, Printer, Keyboard/mouse

5 0
3 years ago
Read 2 more answers
25 POINTS FREE POINTS
RSB [31]

Answer:

1) You wanna say so let me<em> </em><u>check my chest, my breath right quick</u>

2) I'm a savage <u>Classy, bougie, ratchet </u>

3) All the kids are <u>depressed</u>

4) Close your eyes shut your mouth d<u>ream a dream and get us out</u>

5) She's the girl next door, <u>nice, but not in a heart that's pure</u>

Explanation:

8 0
3 years ago
Read 2 more answers
Which of the following is an example of a query with an explicit location? Select all that apply. True False [walmart boston], E
Bond [772]

Answer:

Explanation:

True [walmart boston], English (US)

True  [libraries in san francisco], English (US)

False [coffee shops nearby], English (US)

True [best buy New York], English (US)

6 0
4 years ago
Read 2 more answers
Other questions:
  • 1. If you are 15% years old, you are old enough to obtain
    10·2 answers
  • Jenny has to include the image of a sun on one of her slides. She needs to write relevant text about it on a dark background on
    6·1 answer
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • 1. Reference initials are always typed on a business letter.
    6·1 answer
  • NEED ASAP!!
    14·1 answer
  • Question 1<br> REVPAR and REVPOR are basically the same thing.<br> True<br> False
    11·1 answer
  • Which of the following is a setting in both the Transparency panel and the Mirror panel?
    10·1 answer
  • Your agile team only has one database developer. So the other developers finish their tasks and then wait for their work to be I
    6·1 answer
  • Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
    5·2 answers
  • When you print documents on your laser printer, you see residue from previous images on the output. What two things are the most
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!