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]
4 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]4 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
Acts as a platform on which application software runs?
Arisa [49]
The answer your looking for is System software
4 0
3 years ago
Which of the following skills do employers in any field expect their employees<br> to have?
Novay_Z [31]

Answer:

There are four options: and the letter B is the correct answer.

A. Ability to lift at least 30 pounds  

B. Ability to use word processing software  

C. Ability to use a cash register  

D. Ability to provide a healthy work environment

Explanation:

Nowadays the technology is part of our lives, even in our jobs, nowadays practically is necessary to know to manage some applications and software, for example, word to manage documents or excel to manage formulas, even in physical jobs people must know to manage those programs, and for people want to get a better job is necessary.  

8 0
4 years ago
Suppose you want to click up- and down-arrows on a "control" to change the value of the product price in cell C7. What form cont
Julli [10]

Answer:

Spin button.

Explanation:

Spread sheet applications are softwares used to analyze and manipulate data for clean and easy data presentation.

It is composed of columns or fields and rows or records to make a worksheet of a workbook in the application. Each box on the worksheet is called a cell.

Data can be inputted directly to a cell or with functions and formulas and with the form control feature.

Form control is use to specify the range of input to use in cells for easy data input. The spin button of the form control is used to input data by pressing the up and down arrow key on the keyboard.

8 0
3 years ago
What is the output?<br> &gt;&gt;&gt; password = "sdf#_356"<br> &gt;&gt;&gt; password.isalnum()
Nat2105 [25]

Answer:

Think the output is False because the string password contains #.

Explanation:

please rate Brailliest if you happy. keep in touch if you need any further assistance.☺️

8 0
3 years ago
Read 2 more answers
Python exercise grade 10
Lemur [1.5K]

nums = []

while True:

   num = float(input("Enter a number: "))

   if num <= 0:

       break

   nums.append(num)

print("The largest number entered was",max(nums))

I wrote my code in python 3.8. I hope this helps.

5 0
3 years ago
Other questions:
  • A(n) _______________ supplies one of the most critical aspects of docking stations, but in a smaller, more portable format: supp
    15·1 answer
  • Which is missing in most areas that do not have Karst topography?
    10·2 answers
  • Why do nonprofit agencies often include blogs on their websites?
    5·1 answer
  • Which field data type would you use if you'd like to store videos in that field a text b memo c Boolean D binary object E null
    11·2 answers
  • Suppose that you have been running an unknown sorting algorithm. Out of curiosity, you once stopped the algorithm when it was pa
    8·1 answer
  • Write a program code to accept the names of 3 users and generate a user name as shown in the example. Accept the name of 3 user
    9·1 answer
  • 1. List three tabs that make up the Ribbon
    14·1 answer
  • True or False? Popular sites are always mean accurate
    12·2 answers
  • Say true or false. a)ICT in education is used as teaching learning aid
    9·1 answer
  • Ann, a user, reports that her pc is running slower than usual. which tool would best allow you to identify the bottleneck?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!