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
In a computer-controlled greenhouse, a temperature sensor and a window motor are connected to the computer.
GrogVix [38]
Hope this helps solve it

8 0
3 years ago
A software development company wants to reorganize its office so that managers and the Computer Programmers they supervise can b
dimaraw [331]
Perhaps instead of cubicles, desks are organized in an open workspace which promotes collaboration (and makes it easier).
7 0
3 years ago
Read 2 more answers
Why is there no ide length or timing for study breaks?​
Ghella [55]

Answer:

Could you add more to ur question?

4 0
3 years ago
Which of the following is NOT true about variables?
VikaD [51]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The value stored by a variable can be changed after it is assigned(true).

The value of a variable can be changed after it is assigned, for example:

int a=10;

and we can change the value of variable a in letter program such as:

a=15;

Variables are a name for a spot in the computer's memory (true).

it is true, because the variables value stored in the computer's memory and we can access theses values by their name (variable name). so Variables are a name for a spot in the computer's memory.

Variable names can be words: such as temperature or height (true).

Yes, the variable name can be words such as height, width, temperature etc.

The value stored by a variable cannot be changed after it is assigned (false).

It is noted that the value stored by a variable can be changed after it is assigned. However, it is noted that is some programming language, you can't change the value of static variable.

3 0
4 years ago
Complete the statement below with the correct term.
g100num [7]

Answer:

boot disk

Explanation:

This disk contains files required by the boot sequence as well as the operating system, which is loaded at the end of the startup process.

8 0
4 years ago
Other questions:
  • Differentiate among web apps, mobile apps, and mobile web apps.
    14·2 answers
  • Lexi wants to buy a $300 painting. when she gets to the store, she finds that it is on sale for 40% off. how much does Lexi spen
    10·1 answer
  • Mobile app designers who work for themselves are often dubbed _____.
    10·1 answer
  • g Write a function named vowels that has one parameter and will return two values. Here is how the function works: Use a while l
    9·1 answer
  • Is it good to work out at the gym one day with hands then the next with feet, then a pattern?
    11·2 answers
  • The __________ gear is the input gear.<br> A. Drive<br> B. Driven
    5·2 answers
  • true or false You are able to change the formatting of a table after it is inserted into a placeholder.
    6·1 answer
  • A file manager is used for all of the following except ____.
    12·1 answer
  • High-level languages must be translated into machine language before they can be executed. _________________________
    10·1 answer
  • What type of an attack is being executed if an attacker substituted an invalid mac address for the network gateway so no users c
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!