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
-The following type of Access form allows to see multiple records in an Excel-like arrangement of data fields:
Damm [24]
Data sheet

Data sheet is what an excel sheet is so it’s the same thing
4 0
3 years ago
Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
stira [4]
I believe it is B hope this helped you<span />
5 0
3 years ago
Instead of sending an entire file in one big chunk across the​ Internet, __________ is used which dices the file up into little
azamat

Answer:

TCP/IP

Explanation:

TCP/IP which stands for Transmission Control Protocol and Internet Protocol are network protocols which divide your message into smaller chunks or fragments known as network packets and sends them out onto the Internet. When the chunks arrive at the intended destination, TCP/IP on the receiving end reassembles the network packets into the original message.

TCP/IP are the main protocols used for sending data over the internet.

7 0
2 years ago
What is returned by the code: range (5, 100, 25) ?
Nataly [62]
You would have to add them up need more info on the returned video
6 0
3 years ago
Read 2 more answers
Can someone please help me? (,:
Scorpion4ik [409]
14) Answer: Feathered images

15) Answer: Scale

Hope this helps have a nice day :)
3 0
2 years ago
Other questions:
  • What car dealership websites did you use to conduct your research?​
    8·1 answer
  • The Quick Access Toolbar cannot be customized and have extra commands added to it
    5·1 answer
  • Your marketing director at ABC Marketing Agency would like to set up an email campaign that will use personalization to referenc
    5·1 answer
  • For what purpose is keylogging software used? a. To automatically translate input to another language as the user enters data b.
    10·1 answer
  • Grace is performing a penetration test against a client's network and would like to use a tool to assist in automatically execut
    13·2 answers
  • Match each proofreading mark to the expected result.
    10·1 answer
  • Match the desired outcome to the appropriate action.
    6·1 answer
  • What happens if a computer lags too much?
    14·2 answers
  • How are actual rocket launches similar to how balloon rockets and canister rockets launch?
    6·1 answer
  • Data becomes _______ when it is presented in a format that people can understand and use.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!