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
Advocard [28]
3 years ago
6

Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both sing

le words. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones
Computers and Technology
1 answer:
Dmitriy789 [7]3 years ago
7 0

<em>Complete Question:</em>

<em>Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. End with newline.  </em>

<em>Example output if the input is: Maya Jones </em>

<em>Jones, Maya</em>

<em></em>

<em>In C++</em>

<em></em>

Answer:

The program written in C++ is as follows

<em>#include<iostream></em>

<em>using namespace std;</em>

<em>int main(){</em>

<em>string lname, fname;</em>

<em>cout<<"First name: ";</em>

<em>cin>>fname;</em>

<em>cout<<"Last name: ";</em>

<em>cin>>lname;</em>

<em>cout<<lname<<", "<<fname;</em>

<em>return 0;</em>

<em>}</em>

<em />

Explanation:

This line declares lname, fname as string to get the user's last name and first name, respectively

<em>string lname, fname;</em>

This line prompts the user for first name

<em>cout<<"First name: ";</em>

This line gets the user first name

<em>cin>>fname;</em>

This line prompts the user for last name

<em>cout<<"Last name: ";</em>

This line gets the user last name

<em>cin>>lname;</em>

This line prints the desired output

<em>cout<<lname<<", "<<fname;</em>

You might be interested in
What is the name of the technology that is typically implemented on switches to avoid Ethernet connectivity problems when the wr
Andrew [12]

Answer:  Medium Dependent Interface Crossover (MDIX)

Explanation:

The technology that is typically implemented on switches to avoid Ethernet connectivity problems is Medium Dependent Interface Crossover(MDIX) For switches with Auto (MDIX) the connection is configured automatically and a crossover or straight-through cable can be used to connect two switches. When this MDIX interface is connected it corrects the connectivity speed and the cabling for proper device functionality.

4 0
3 years ago
What were the important developments that occurred in photography that facilitated the creation of motion pictures? Two critical
8_murik_8 [283]

Answer:

"A moving picture is an illusion that makes a still photo seem to move. The basic principal behind motion pictures is the fast transition between one picture to the next, almost creating a seamless transition. A flip-book is a good example of this. Another example would be film used for old movies. The film contains negatives of an image which when light is shined through creates a "shadow" of the image. If you quickly transition the film from one image to the next you end up a motion picture."

Explanation:

7 0
2 years ago
Do you think that feedly will help you create an effective personal online learning environment? Why or why not?
goldenfox [79]

Yes. Feedly will help me create an effective personal online environment. I am able to keep up with all the topics that matter to me most. Feedly is able to help me discover insightful sources from publications and blogs. Feedly is also able to uniquely offer clean, minimalist reading experience optimized for productivity.

5 0
3 years ago
television broadcasts were originally delivered by using which technology? ethernet wireless coaxial cable broadband
laiz [17]

Television broadcasts were originally delivered by using:

  • Ethernet
  • Coaxial cable
  • [Wireless] or  Broadband

<h3>What is Ethernet is used for?</h3>

Ethernet is known to be a kind of network or services that is often used to link two or more devices in a network.

This is known to be very  popular kind of network connection. It is known to be used in  local networks by specific organizations such as offices, school campuses and  it is used often for Television broadcasts.

Therefore,  Television broadcasts were originally delivered by using:

  • Ethernet
  • Coaxial cable
  • [Wireless] or  Broadband

Learn more about Ethernet from

brainly.com/question/1637942

#SPJ1

7 0
1 year ago
Discuss the advantages and disadvantages of using a USB or parallel port dongle for licensing purposes.
Dafna11 [192]

An advantage is portability A disavantage is loseability An advantage is faster read and write speeds(most of the time) a disavantge is less storage

4 0
3 years ago
Read 2 more answers
Other questions:
  • The _________ specifies the station(s) for which the frame is intended. it may be a unique physical address, a group address, or
    5·1 answer
  • Debugging is not testing, but always occurs as a consequence of testing. <br> A) TRUE<br> B) FALSE
    13·1 answer
  • Claudia has a bachelors degree in computer information systems and she has learned to use some popular software testing tolls wh
    13·2 answers
  • In cell G6, use the appropriate lookup and reference function to retrieve the rental rate from the named range RentalRates. The
    15·1 answer
  • The software used to help run the computer hardware is the _____.
    9·2 answers
  • What saw do you use to cut wood in design and technology
    7·1 answer
  • What is the component on the motherboard that confirms all devices are in working order once the computer is turned on?
    13·1 answer
  • Agent Phil Coulson developed this program to register Avengers in S.H.I.E.L.D's database using cutting-edge programming language
    15·1 answer
  • Kaitlin likes a particular design theme, but she is not sure about every single color for bullets, backgrounds, etc. found in th
    7·1 answer
  • Sampson runs his own online business, and much of his success depends on the reliability and accuracy of various online data. Ho
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!