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
A database is used instead of a spreadsheet when?
Luba_88 [7]
Lists involve date with multiple themes. 
5 0
3 years ago
The sum of all the minterms of a boolean function of n variables is equal to 1.
Aleksandr-060686 [28]

The answers are as follows:

a) F(A, B, C) = A'B'C' + A'B'C + A'BC' + A'BC + AB'C' + AB'C + ABC' + ABC

= A'(B'C' + B'C + BC' + BC) + A((B'C' + B'C + BC' + BC)

= (A' + A)(B'C' + B'C + BC' + BC) = B'C' + B'C + BC' + BC

= B'(C' + C) + B(C' + C) = B' + B = 1


b) F(x1, x2, x3, ..., xn) = ∑mi has 2n/2 minterms with x1 and 2n/2 minterms

with x'1, which can be factored and removed as in (a). The remaining 2n1

product terms will have 2n-1/2 minterms with x2 and 2n-1/2 minterms

with x'2, which and be factored to remove x2 and x'2, continue this

process until the last term is left and xn + x'n = 1

4 0
3 years ago
RAM IS often referred
miss Akunina [59]
3

thank me later :))))))))
7 0
3 years ago
Need help asap please​
Fofino [41]
Because you can make it to where they cannot find or see or look or talk or anything on your profile it can cut off Comunication from the person. It can also protect your safety!
6 0
2 years ago
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
DaniilM [7]

Answer:

1. would be B.

2. would be D

3. May I ask if it can be multiple answers?

Explanation:

1. In coding a if statement has to follow if something is true or not. If we are talking about a if and then statement it will skip that block and move to the next block of the "then" part of the "if then" Statement if the first part is reported false

2. This is a easy one, so it has to be either a 3.25 GPA or higher or they have to have either 100 hours or more.

3. waiting for a comment back :)

4 0
3 years ago
Other questions:
  • The ____ contains methods that allow you to set physical properties such as height and width, as well as methods that allow you
    14·1 answer
  • Discuss Hashing and how it is utilized within the IT industry. Also, discuss how Hashing can improve our sorting and searching r
    12·1 answer
  • Write a program that reads in the length and the width of a rectangular yard.
    5·1 answer
  • One key criterion for selecting social networks is the number of daily visitors to the website. when comparing linkedin traffic
    7·1 answer
  • In what stage of an algae or fungi life cycle are they able to reproduce spores?
    10·1 answer
  • TP1. लेखा अभिलेखको अर्थ उल्लेख गर्नुहोस् । (State the mea
    15·1 answer
  • PLZ HELP ASAP
    13·1 answer
  • In this paper https://arxiv.org/pdf/2008.10150.pdf, I'm having a hard time understanding how the assignment in the picture is de
    10·2 answers
  • P.W. Singer jokes about how many people are using Wang computers. What point is he making with this joke?
    8·1 answer
  • Susan discovers the following log entries that occurred within seconds of each other in her Squert (a Sguil web interface) conso
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!