(9.10 Code Practice: Question 1)

Instructions
Write code that takes in two words from user input. Then, the program should swap the two variables that hold the inputs and print the words in backward order.

Sample Run
Enter a word: apple
Enter a word: zebra
zebra
apple

Answers

Answer 1

Answer:

#include <iostream>  

#include <string>

using namespace std;  

int main() {

 string wOne, wTwo, temp;

 cout << "Enter a word:";

 cin >> wOne;

 cout << "Enter a word:";

 cin >> wTwo;

 

 temp = wOne;

 wOne = wTwo;

 wTwo = temp;

 cout << wOne << endl;

 cout << wTwo << endl;

 

}


Related Questions

What was true of Northern cities?
O A. Governments ensured that all areas of city had equal public
services
B. Segregation was limited to the workplace.
O C. The rights of wealthy citizens were protected regardless of their
race.
D. Segregation was practiced even where it was not the law.​

Answers

Answer:

D. Segregation was practiced even where it was not the law.

For a surface to exist, it must have I closed-loop AND be coplanar.

True

False

Answers

Answer:

False.

Explanation:

I will try to explain by presenting a contradiction to the given statement. Let us consider the surface of a sphere ( a ball is a sphere). While it has a closed loop surface it is not coplanar. In fact, a sphere exists in 3d and its surface can not lie in one plane. Hence, the given statement is false and surfaces do not have to be coplanar.

False this is FALSE
Other Questions
No Solutions2x + 9 + 3x + 1 = _x + _ New oil is reserves are discovered. What has increased in supply.A CAPITALB ENTERPRISEC LABOURD LAND Find the area of each figure to determine the area of the composite figure. The area of the rectangle is 44 m2. The area of the circle is about m2. the area of the circle by 2 to find the area of the semicircle. To find the area of the composite figure, the area of the rectangle and the area of the semicircle. Determine the pH of 0.150 M magnesium hydroxide solution The surface inside the circles will be painted green. The surface outside the circles will be painted white. What is the ratio of green paint to white paint you will need to paint these tiles? \((\pi^2-4):\pi^2\) a \(\pi^2:(\pi^2-4)\) b \(\pi:(4-\pi)\) c \((4-\pi):\pi\) d Please answer this correctly What is the rule for the reflection?M(-5,4)M'(5 4)4Ory-axis(x, y) + (-x, y)Ory-axis(x, y) = (x, -y)Orx-axis(x, y) - (x, y)Orx-axis(x, y) = (x, -y)(-6,2) N(-3,2)?N'(32L'6,22. The area of a rectangular field is represented by the expression 14x-3x^2+2y. The width of the field is represented by the expression 5x-7x^2+7y. How much greater is the length of the field than the width? 9x+4x^2-5y9x-10x^2-5y19x+4x^2+9y19x-10x^2+9y A student simplified the rational expression using the steps shown. A room is 6 m long, 4.5 m wide and 3 m high. It has no windowor door. It only has 4 walls. Find the cost of painting the 4 walls at$8.50 per m2 What is the value of x in the equation 5(3x + 4) = 23?A)43/15B)3/15 C)15/43D)2/5 Please help i will mark brainliest for anyone who can help me 15 points on the lineA:a^5 divided by a^2B:C^4 divided by c^3 Can somebody help me with this and show work ?? :) Please help. Ill mark you as brainliest if correct . I dont understand this math problem. Thank you . how can 18, 3, 24 = 30 in order of operations What are the pros and cons of having the digestion be slower and over distance, as opposed to being quicker and over shorter distance with slightly less absorption?(40 points) how does bimettalic strip work? How does the author develop the idea that World War II created positive change in the United States? introduction to world war 2 Ten rugby balls are randomly selected from the production line to see if their shape is correct. Over time, the company has found that 89.4% of all their rugby balls have the correct shape. If exactly 6 of the 10 have the right shape, should the company stop the production line? Please answer this correctly