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
Mnenie [13.5K]
3 years ago
10

CHALLENGE ACTIVITY 2.15.1: Reading and outputting strings. 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. Example output if the input is: Maya Jones Jones, Maya 1 2 3 4 5 6 7 8 9 10 11 12 #include #include using namespace std; int main() { string firstName; string lastName; /* Your solution goes here */ return 0; } 1 test passed All tests passed Run
Computers and Technology
1 answer:
alisha [4.7K]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   string Fname, Lname;

   cout << "Please Enter your first name " <<"Please Enter Your Last Name" <<endl;

   cin>>Fname>>Lname;

   cout<<Lname<<", "<<Fname<<endl;

   return 0;

}

Explanation:

This program is written in C++ programming Language. Firstly two string variables are declared these are Fname and Lname for first and last name respectively. C++ cout statement is used to prompt user for inputs and the cin statement is used to save the inputs in the respective variables. Using the cout operators (<<) the output is formatted as required by the question

You might be interested in
Define stubs for the functions get_user_num() and compute_avg(). Each stub should print "FIXME: Finish function_name()" followed
elena-14-01-66 [18.8K]

Answer:

Replace your solution goes here with the following:

def compute_avg(num1, num2):

   func_name = "compute_avg()"

   print("FIXME: "+func_name)

   return -1

def get_user_num(user_num):

   func_name = "get_user_num()"

   print("FIXME: "+func_name)  

   return -1  

Explanation:

This defines the compute_avg function

def compute_avg(num1, num2):

This sets the function name

   func_name = "compute_avg()"

This prints the required output

   print("FIXME: "+func_name)

This returns -1

   return -1

This defines the get_user function

def get_user_num(user_num):

This sets the function name

   func_name = "get_user_num()"

This prints the required output

   print("FIXME: "+func_name)

This returns -1  

   return -1  

4 0
3 years ago
Understanding the context of information allows you to apply it to everyday situations as opposed to just___facts like names,dat
posledela
Dates best choice I would pick it
5 0
3 years ago
Personality traits such as thoughtfulness, empathy, self-control, and goal orientation belong to the _____ category.
klio [65]

Answer:

C conscientiousness

Explanation:

4 0
3 years ago
Read 2 more answers
Complete a flowchart and a Python program to calculate grade of a student based on marks using the following criteria:
erik [133]

Answer:

grade = int(input("Enter grade: ")

if grade > 90:

   print("A*")

elif grade > 80 and grade < 90:

   print("A")

elif grade > 70 and grade < 80:

   print("B")

elif grade > 60 and grade < 70:

   print("C")

elif grade > 40 and grade < 50:

   print("E")

else:

   print("Fail")

Explanation:

8 0
3 years ago
Pat creates a table in a spread sheet
Anna11 [10]

Answer:

Explanation:

Details?

7 0
4 years ago
Other questions:
  • ?the single most effective security measure for digital devices is to password protect access to them.
    5·1 answer
  • The command prompt found on windows 10 is very similar to the interface of what past operating system?
    5·2 answers
  • How will you -
    9·1 answer
  • Which steps can you use to open the Reveal Formatting pane?
    5·2 answers
  • Making sure that your business has something special and distinct to offer is known as?
    12·1 answer
  • When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make su
    14·2 answers
  • Explain the uses of computer in police department​
    13·2 answers
  • Mencione 2ejemplos de procesos manuales
    11·2 answers
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
  • quizlet ann is a security professional for a midsize business and typically handles log analysis and security monitoring tasks f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!