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
Describe what a layer 3 router is and what are its advantages and drawbacks compared to other network devices.
Oduvanchick [21]

Answer:

Did you mean layer 3 switch? Because a router always operates at layer 3

Explanation:

If the answer is yes, then a layer 3 is a switch that combines the functions of a switch and a router. So it is capable of operate layer 2 and layer 3. Some of its benefits are: Support routing between VLAN, decrease network latency because the packets don’t have to make extra hops to go through a router and reduce security management. But they are really expensive and lack of WAN functionality so they are used mostly for large intranet environments.

3 0
3 years ago
A ________ power station uses the energy from a small piece of metal called Uranium ​
grigory [225]

Answer:

nuclear power plant

Explanation:

A nuclear reactor, or power plant, is a series of machines that can control nuclear fission to produce electricity. The fuel that nuclear reactors use to produce nuclear fission is pellets of the element uranium. In a nuclear reactor, atoms of uranium are forced to break apart.

3 0
3 years ago
Read 2 more answers
To move or copy a range of cells, select the correct order:
Karo-lina-s [1.5K]

Answer:

Correct Order

2. Select the cell or range you want to move or copy.

1. Move the pointer over the border of the selection until the pointer changes shape.

3. To move the range, click the border and drag the selection to a new location, or to copy the range, hold down the Ctrl key and drag the selection to a new location.

Explanation:

To move or copy range of cells in MS Excel, You first select the cell/range you want to move or copy, hover the mouse pointer and take note when it changes shape, then finally click the border (when you noticed the change of shape of the pointer) and hold down the ctrl key and drag it to the destination location.

6 0
3 years ago
Determine whether the relation represents a function. If it is a​ function, state the domain and range.
slava [35]

Answer:

Yes, the relation is a function

Domain = {-3,1,3,7}

Range = {7,3,1-1}

Explanation:

Given

{(-3,7),(1,3),(3,1),(7,-1)}

To determine if the relation is a function or not, we check if every output has only one corresponding input.

The output are (7,3,1-1) while the input are (-3,1,3,7)

-3 ----;> 7

1 -------> 3

3 -------> 1

7 -------> -1

It is a function since every output only has one corresponding input

To find the domain, we look at the set of input values

Domain = {-3,1,3,7}

To find the range, we look at the set of output values

Range = {7,3,1-1}

3 0
3 years ago
research the internet and develop a list of three important rules/standards you will give to the team to help everyone easily fi
natima [27]
The three important rules/standards that I can give to the team to help everyone easily find the documents in the future are the following:
1. Develop naming convention on how to define filename/documents.
2. All changes in the documents must be well documented, there should be a record of changes.
3.There must be a defined standard procedures on how to save and access the file, and who are allowed to modify the documents.
6 0
3 years ago
Other questions:
  • Into which of these files would you paste copied information to create an integrated document?
    13·2 answers
  • Which of the following is a true statement? Question 33 options: Data entities correspond to sources/sinks on a data flow diagra
    14·1 answer
  • ____ convert a program design developed by a systems analyst or software developer using one of many computer languages.
    10·1 answer
  • To pinpoint an earthquake's location, scientists need information from how many seismometers?
    8·1 answer
  • There are a few simple rules that you can follow to store and manage files and folders in your computer. What is the most import
    9·2 answers
  • Which of the following statements is correct?
    11·1 answer
  • The small flash memory used in<br>protable device like Laptop<br><br>​
    10·1 answer
  • Which of the following is true about binary search. A. It uses binary numbers in its algorithm B. It is slower than sequential s
    13·1 answer
  • Which of the following statements describes the general idea of an assistive media​
    7·1 answer
  • Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a d
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!