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
Sunny_sXe [5.5K]
3 years ago
7

Write a program that has the following String variables: firstName, middleName, and lastName. Initialize these with your first,

middle, and last names. The program should also have the following char variables: firstInitial, middleInitial, and lastInitial. Store your first, middle, and last initials in these variables. The program should display the contents of these variables on the screen.
Computers and Technology
1 answer:
Licemer1 [7]3 years ago
3 0

Answer:

The programming language is not stated; However, I'll answer your question using C++ programming language.

Comments are used for explanatory purpose

Program starts here

#include<iostream>

#include <string>

using namespace std;

int main()

{

//Declare Variables

string firstName, middleName, lastName;

char firstInitial, middleInitial, lastInitial;

/*Initialize firstName, middleName and lastName (Replace values with your details)*/

firstName = "First Name";

middleName = "Middle Name";

lastName = "Last Name";

 

// Get Initials

firstInitial = firstName.at(0);

middleInitial = middleName.at(0);

lastInitial = lastName.at(0);

 

//Print Results

cout<<"Lastname: "<<lastName<<endl;

cout<<"Firstname: "<<firstName<<endl;

cout<<"Middlename: "<<middleName<<endl;

cout<<"Last Initial: "<<lastInitial<<endl;

cout<<"First Initial: "<<firstInitial<<endl;

cout<<"Middle Initial: "<<middleInitial<<endl;

return 0;

}

You might be interested in
1. What is the central idea of the section "Service Record." Use two text details to
Vladimir [108]

Answer:

Service record is the record that is used to track the record of service of the employ in an organization.

Explanation:

The idea behind the service record is to maintain the whole detail of record of the person during his employment including, personnel information,  record related to his promotions and posting, salary record etc.

8 0
3 years ago
What stylistic device does Reverend Jesse Jackson use in the following statement: "We must relate instead of debate; we must ins
vivado [14]

Answer:

Parallelism

Explanation:

Parallelism:- It is a linguistic device.It is basically the use of components that are similar in their meaning ,sound or construction.So in the statement by Reverend Jesse Jackson .The statement uses words that sound similar and the statements have similar construction.

So we conclude that the answer is parallelism.

8 0
3 years ago
How do I delete my account on Brainly? It says I must enter my password to do so, but I never set up a password. When I try the
Lady_Fox [76]
Try using your email account password
8 0
2 years ago
Use a VLOOKUP function in cell I5 to identify and calculate the federal withholding tax. Use the tax rates from the range D21:E2
SVEN [57.7K]
In the Cell 'H13' of Sheet 'Payroll Data', the 'Formula' was not set to 'G13-B13*$B$24'.
6 0
3 years ago
HURRY PLS
gogolik [260]

Answer:

the testing team

Explanation:

because even though she may have fulfilled the requirements but she still need to test if it runs perfectly or not

7 0
1 year ago
Other questions:
  • Adding a ____ to text adds depth and helps the letters display prominently.
    5·1 answer
  • A client accessing a network share folder has authenticated into the system and has full access rights to a folder share. But af
    11·1 answer
  • Design and implement a class Country that stores the name of the country, its population, its area, and the population density (
    6·1 answer
  • A _____ is a harmful program that resides in the active memory of a computer and duplicates itself. Select one: a. scareware b.
    7·1 answer
  • A junior administrator is having issues connecting to a router's console port using a TIA/EIA 568B standard cable and a USB seri
    5·1 answer
  • Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
    15·1 answer
  • Assume you are working for the laboratory that is developing the control system for the LISAsatellites. Your job is to develop a
    9·1 answer
  • The purpose of Appetizers on the menu​
    6·2 answers
  • How can IT infrastructure be linked to the business strategy of any organization
    9·1 answer
  • If a system contains 1,000 disk drives, each of which has a 750,000- hour MTBF, which of the following best describes how often
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!