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
elena-s [515]
3 years ago
15

Use the variables k, d, and s so that they can read three different values from standard input--an integer, a double, and a stri

ng respectively. On one line, print these variables in reverse order with exactly one space in between each. On a second line, print them in the original order with one space in between them.
Computers and Technology
1 answer:
Nat2105 [25]3 years ago
7 0

Answer:

The c++ program to implement the given scenario is shown below.

#include <iostream>

using namespace std;

int main() {

   // variables declared as mentioned

   int k;

   double d;

   string s;

   cout << " Enter an integer value, a double value, a string value in the mentioned order " << endl;

   cin >> k >> d >> s;

   // variables printed in reverse order

   cout << " Reverse order " << endl;

   cout << s << " " << d << " " << k << endl;

   // variables printed in original order

   cout << " Original order " << endl;

   cout << k << " " << d << " " << s << endl;

   return 0;

}

OUTPUT

Enter an integer value, a double value, a string value in the mentioned order  

12 45.67 brainly

Reverse order  

brainly 45.67 12

Original order  

12 45.67 brainly

Explanation:

1. All the variables are declared as mentioned in the question.

int k;

   double d;

   string s;

2. The user is prompted to enter values for integer, double and string variables respectively. The input is accepted in the order mentioned above.

cin >> k >> d >> s;

3. The input is accepted in a single line since this is mentioned in the scenario that variables should be printed in the order in which they are read.

4. These variables are displayed to the standard output in reverse order – string, double, integer. The variables are displayed with exactly one space in between them.

cout << s << " " << d << " " << k << endl;

5. Then, variables are displayed in the original order – integer, double, string. The variables are displayed with exactly one space in between them.

cout << k << " " << d << " " << s << endl;

You might be interested in
The two key elements of any computer system are the____and the _____.
Virty [35]
Easy.
Hardware and software!
Did you ever try to use a computer with only mouse and monitor?
8 0
3 years ago
What is tahe difference between a cone and a prism
Natalka [10]

prism is (geometry) a polyhedron with parallel ends of the same size and shape, the other faces being parallelogram-shaped sides while cone is (label) a surface of revolution formed by rotating a segment of a line around another line that intersects the first line.

4 0
2 years ago
I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding
Oksana_A [137]

Answer:

Pseudocode:

import random

fetch user input on a lucky number

insert input into variable - "response"

new variable, random = randint

condition to check wheather random is our response

display results

Python Code:

import random

def main():

response = int(input("Guess my lucky number, its between 1 and 100: "))

lucky_number = random.randint(1,100)

if response == lucky_number:

print(f"Wow you're right, it is {lucky_number}")

else:

print("Sorry, Try Again")

main()

Reminder:

intended for python3 as i included the format f

also it could be done without the import, just manually insert a number

i'll leave the post mortum to you

Explanation:

3 0
3 years ago
Is the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfa
klemol [59]

Answer:

customer-serious orientation

Explanation:

Customer-serious orientation can be defined as the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfaction.

This ultimately implies that, a customer-serious oriented business firm or company puts the needs, wants and requirements of its customers first without considering their own needs in a bid to satisfy and retain them.

Hence, customer-serious orientation requires the employees working in an organization to show and demonstrate positive attitudes and behaviors at all times.

6 0
3 years ago
E) ¿Entiende usted que tendría repercusión legal un mal manejo de los datos del cliente por parte de la empresa? ¿Por qué?
weqwewe [10]

Answer:

Efectivamente, un mal manejo de los datos del cliente por parte de la empresa tendría repercusiones legales que afectarían negativamente a la compañía. Esto es así porque un eventual mal manejo de los datos personales de los clientes implicaría una filtración de dichos datos hacia el resto del público, con lo cual los datos personales y privados de cada cliente se verían expuestos en forma pública, generando así posibles daños a estos a través de la mala utilización de dicha información por parte de terceros malintencionados.

4 0
3 years ago
Other questions:
  • __________ software helps the computer carry out its basic operating tasks.
    8·1 answer
  • What type of malware actually evolves, changing its size and other external file characteristics to elude detection by antivirus
    5·1 answer
  • Describe IT infrastructure. What is the role of business intelligence in determining the technology needs of a business?
    11·1 answer
  • In a nested repetition structure, one loop, referred to as the ____ loop, is placed entirely within another loop, called the ___
    5·1 answer
  • Which statement describes a mobile device feature? Docking stations can add some functionality to mobile devices such as video o
    11·1 answer
  • 1. Write a CFG to generate identifiers (IDs) in the Java Programming Language. An ID in Java is a string of characters consistin
    5·1 answer
  • Does anybody know how to do 6.3 code practice on edhesive. NEED ASAP!!!​
    14·1 answer
  • Discuss any five factors that hinder the application of a computer in business organisations​
    15·2 answers
  • When attaching a file or files in outlook 365 you select the attach command and then select the files location
    5·1 answer
  • Carmen has met new people online that she enjoys talking to. One of these people has asked her to meet at the park in person and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!