1.Write a C++ program that allows the user to enter the phrase "I am smart". Output the first letter and last letter of the phrase using string properties.

2.Write a C++ program to output the following values after they are loaded into an array: 67, 45, 12, 89, 46, 88 and 43.
PLS Help they are different questions

Answers

Answer 1

Answer:

1)

string value;

cout << "type I am smart";

cin >> value; // get user input from the keyboard

2)

int num1 = 67;

int num2 = 45;

int num3 = 12;

int num4 = 89;

int num5 = 46;

int num6 = 89;

int num7 = 46;

int num8 = 88;

int num9 = 43;

int numbers [ ] = {num1,num2,num3,num4,num5,num7,num8,num9} ;

//to load it as a function

int main ()

{

for ( n=0 ; n<5 ; n++ )

{

result += numbers[n];

}

cout << result;

return 0;

}

Answer 2

The C++ programs are illustrations of arrays and strings

The program 1

The program written in C++ is as follows:

#include<iostream>

using namespace std;

int main(){

   //This declares the string

   string myStr;

   //This gets the input

   cin>>myStr;

   //This prints the first and the last index elements

   cout<<myStr[0]<<" "<<myStr[myStr.length()-1];

   return 0;

}

The program 2

The program written in C++ is as follows:

#include<iostream>

using namespace std;

int main(){

   //This initializes the array

   int myArr [] = {67, 45, 12, 89, 46, 88, 43};

   //This prints the array elements

   for(int i = 0; i<7;i++){

       cout<<myArr[i]<<" ";

   }

   return 0;

}

Read more about arrays and strings at:

https://brainly.com/question/15683939

#SPJ2


Related Questions

______ requires that any electronic communication must be backed up and secured with reasonable disaster recovery infrastructure.

Answers

SOX requirements requires that any electronic communication must be backed up and secured with reasonable disaster recovery infrastructure.

Sarbanes Oxley (SOX) requires that data security policies are being made, effectively communicated and enforced. This is needed for data security as well as protecting financial data needed for normal operations.

SOX requirements are needed to be met so as to perform compliance auditing.

Find out more at: https://brainly.com/question/17157670

What happens as a blog's audience grows?
A. It acquires more insurance.
B. Its influence widens.
O C. Its HTML becomes longer.
O D. It acquires more domain names.

Answers

Answer:

ᴀ. ɪᴛ ᴀᴄǫᴜɪʀᴇs ᴍᴏʀᴇ ɪɴsᴜʀᴀɴᴄᴇ.

Explanation:

Hᴏᴘᴇ Iᴛ's Hᴇʟᴘ

Explanation:

[tex]a \: it \: acquiresmore \insurance[/tex]

A. it's acquires more insurance

Is noreasters the kind of weather that a place has over a long period of time (true)or (false) ?

Answers

It is true hope this helps

What devices do not need device drivers to be manually installed, and start to function as soon as they are connected to a computer?.

Answers

Plug-and-play devices are electronic devices that do not require any device driver to be manually installed on the host device (computer) and as such they start functioning immediately they are connected to the host device (computer).

Plug-and-play (PnP) can be defined as a technology that is designed and developed to allow an operating system (OS) of a computer to automatically detect and configure a peripheral (input and output device) as soon as they are connected to the computer.

On a related note, a plug-and-play device is an electronic device that do not require any device driver to be manually installed on the host device (computer) and as such it start to function immediately it is connected to the host device (computer).

In Computers and Technology, some examples of a plug-and-play device include the following:

External hard-driveComputer monitorKeyboardWeb-camMouse

Find more information: https://brainly.com/question/17402566

In any and every instance when the Federal Government provides recovery support, all six Recovery Support Functions will be activated. A. TRUE

Answers

Answer:

what?

Explanation:

what are the questions lol

We use the keyboard to point, click, and select menus and icons, and for onscreen navigation. True or False

Answers

Answer:

False.

Explanation:

Hope I could help. Hey, have a nice study time.

Answer:

false

Explanation:

we use our keyboard to type not click icons or point.

Project: On Assignment as a Web Developer
Assignment Directions:

Create a web page for a fictitious company: Widgets Inc. has hired you to make a mock-up for their new website. They are on a budget and only want to have a presence on the Internet. They do not need any fancy bells and whistles. They have sent you an email message with the basic parameters of the site.

The site should have at least three pages. They should include the landing page (commonly named index.htm), a contact page, and a "Meet the Company" page.
Each page should have an identical header containing the company name and motto: "We make widgets fun!"
Each page must include navigation back to the home page (without needing to use the Back button on the browser).
All font styles and alignment must be performed with inline CSS.
The company mascot is a dog, but there is no logo provided in this project. Any picture of a dog will do. Make sure it is prominently displayed on each page.
Each page should display in a web browser with a title.
All employees on the "Meet the Company" page can be random people's photos from the Internet. Please include Jack Sprat, President, Tom Thumb, Vice President, Sally Flag, Treasurer, and Monty Fuller, Secretary.
All text for these pages can be fake. See this website to create filler paragraphs.
Make up email addresses, but use the mail to: command as a hyperlink and display the person's name and not the actual address.
Each page should have a link to the other pages.
Link to at least three remote web pages. One of these should be formatted in an iframe.
The main page should have a sample product table including the following information:
Name Size Color Lead time Price Discount (for 10)
W-1 1X1 Blue 1 week $200.00 10%
R-2 2X2 Green 1 week $1,200.00 15%
D-2 2X3 Red 2 weeks $12,000.00 20%
Assignment Guidelines:

Projects will be assessed on following the requirements and style. Use color (creatively), at least two typefaces, headings, bold and italics, images, background colors, and so on to make your pages.

Submission Requirements:

Standard HTML

Question # 1

File Upload

Ensure that you fulfill all requirements, then upload your final web page project.

Answers

Answer:

It is not possible to upload files .html files here

Select the correct answer.
Which option would you use to insert two line breaks in your document?
A.<2br>
B.

C.


D.

Answers

Answer:

yes, I agree.

Explanation: ,

Can you make a phone app with angular?.

Answers

Answer:

yes

Explanation:

Recursive functions are ________ iterative algorithms. as efficient as less efficient than more efficient than impossible to compare to

Answers

Based on computer programming, Recursive functions are less efficient than iterative algorithms.

Recursive Function vs. Iterative Algorithm

During implementation, the Recursive functions require the module to call itself multiple times till the base condition is satisfied, thereby making the line of codes longer and slower to execute.

In contrast, the Iterative algorithm utilizes looping statements such as for LOOP, WHILE LOOP, or DO-WHILE LOOP to repeat the same steps, thereby making the line of codes shorter and faster to execute.

Hence, in this case, it is concluded that the correct answer is "less efficient than."

Learn more about Recursive Functions here: https://brainly.com/question/25647517

HELP ME!!!!!!! %) select all the correct answer. What will be the output of using the element in the given HTML code? 1011 2 A. 10112 B. 10112 C. 21011 D. 21011

Answers

Answer:

A or B

Explanation:

I'm not sure I used HTML a bit but I am not a pro on it so this might be not correct

Tell me if I'm wrong :)

Answer:

The answer is B: 1011 with the two under

Explanation:

I got it correct on my test.

What genre of games involves gameplay that is designed to simulate real-world or fictionalized activites such as flying a plane or managing a city and often requires resource management?

Simulation games
Puzzle games
Adventure games
Strategy games

Answers

Answer:

simulation games

Explanation:

Simulation games are a broad category of games where gameplay is designed to simulate real-world or fictionalized activities and often require resource management skills.

Answer:

Simulation games

Explanation:

RDP connection from outside the network to a server inside the network. Which network device will a network administrator MOST likely configure to allow this connection? Hub Switch Firewall

Answers

Answer:

Firewall

Explanation:

The firewall might block the Remote Desktop Protocol (RDP) connection. This is because hackers could use open connections to brute force passwords or control an infected computer. The firewall ensures that only authorised connections occur.

codehs python 4.7.6 Powers of Two
it says I'm wrong because I need

Answers

[tex]\huge\fbox\orange{A} \huge\fbox\red{N}\huge\fbox\blue{S}\huge\fbox\green{W}\huge\fbox\gray{E}\huge\fbox\purple{R}[/tex]

[tex]\huge\underline\mathtt\colorbox{cyan}{in attachment}[/tex]

Following are the program to calculate the power of two:

Program Explanation:

Defining an integer variable "i" that hold an integer value.Defining a for loop that checks "i" value in between 20, inside this it calculates power of two.At the last use print method to print its value.

Program:

i=1#holding integer value in i

for i in range(20):#defining a for that starts 1 to 20    

   i = 2 ** i#calculate power of 2 in i variable

   print(i)#print value

Output:

Please find the attached file.  

Learn more:

brainly.com/question/23170807

Set the Append Only property to _____ to allow users to add data to a Long Text field but not to change or remove existing data.

Answers

A computer data storage is made of many features. Set the Append Only property to YES to allow users to add data to a Long Text field but not to change or remove existing data.

Append-only is known to be a characteristic or component of computer data storage. It is where new data can be appended to the storage, but where existing data is said to be immutable.

A field's data type is very essential property as it shows what kind of data the field can store.

Learn more from

https://brainly.com/question/24795103

How to make headers without bootstrap angular.

Answers

Answer:

The idea is page should be fixed and cannot be scroll. Header and footer always stick to top and bottom. the middle part is content which is scroll-able only. contents should not be overlapped by header and footer. Layout should work with different type of devices and screen.

Explanation:

Specifications What are the best practices you should communicate to the Design team about the formatting of the spec book

Answers

The Spec book, describes a formatted writing which contains the major specifications and description of the building blocks of an application or process. The design process should follow formatting guidelines such as ;

Inclusion of table of content, which gives a table like format of the content in the book within the first 25 pages.

Inclusion of the Spec section number in the header and footer section of each page of the book.

Avoid including any other value with the spec section number. Hence, the spec section number must be distinctly seperated.

Learn more : https://brainly.com/question/25648287

_______ is the use of software to assist in the creation, analysis, and modification of the design of a component or product.

Answers

Answer:

C) Computer-aided Design

Explanation:

Options:

a. Computer-aided engineering

b. Computer-aided evaluation

c. Computer-aided design

d. Computer-aided manufacturing

C) Computer-aided design is correct answer

(Hope this helps can I pls have brainlist (crown)☺️)

When you begin designing a program, you work from a ____, a description of what your program should do.

Answers

Answer:

This is usually called a brief (you will also hear this in the design industry, as well as other places)

Which option is used to apply formatting to multiple objects on a single slide while still maintaining the ability to manage these objects independently if desired?

it was B. Grouping feature edg21

Answers

Answer:

b. Grouping feature

Explanation:post protected

Question 8 of 10
When is a table the most effective way to present information?
O A. When graphs are more expensive to create.
O B. When you want to show the parts of a whole.
O C. When you want to show how parts fit together.
O D. When you want to make many details available in an organized
way.

Answers

Answer:

C

Explanation:

Tables and figures are particularly effective when large amounts of information have to be presented and discussed in an effective way.

Answer:

D. When you want to make many details available in an organized way.

Explanation:

A business is having trouble keeping up with the competition. They cannot
respond to their customers like the competition. Which type of system will
likely be able to help them solve this issue?
A. Transaction processing system
B. Management communication system
C. Decision support system
D. Management information system

Answers

Answer:

Decision support system is the answer

Explanation:

Question # 2
Multiple Select
Which of the following statements are true regarding feedback? Select 3 options.

-Feedback is used exclusively for marketing purposes.

-Feedback includes only the unsolicited opinions of customers.

-Feedback can be gathered from everyday activities, like support calls.

-The type of feedback gathered, depends on the phase of the project and the goals for the feedback.

-Customer surveys can be used to ask specific questions.

Answers

The statement that are true regarding feedback are:

c. Feedback can be gathered from everyday activities, like support calls.

d. The type of feedback gathered depends on the phase of the project and the goals for the feedback.

e. Customer surveys can be used to ask specific questions.

What are feedbacks?

Feedbacks are the return compliments or suggestions that are given by customers after taking any service by any company. The business updates its products in response to client input.

He requested input from his employer. According to the sensors' feedback, the computer adjusts. The microphone was providing some input to us. These feedbacks are important for the company or any other person to improve herself.

Therefore, the correct options are c, d, and e.

To learn more about feedback, refer to the link:

https://brainly.com/question/26994432

#SPJ2

Which option ensures that items in a text box or table cell will be in the absolute center of that element?

*i chose b. center, align, middle and got a 100 edg21

Answers

Answer:

Center, Align, Middle

Explanation:is correct. post protected

Consider the following instance variables and method from a class: private String descriptor; public String makeSentence(int quant, boolean sign) { String s = "Object is "; if (!sign) { s += "not "; } for (int i = 0; i < quant; i++) { s += "very "; } return s + descriptor; } Suppose an object of this class is initialized so the value of descriptor is "regular". What would be returned by the call makeSentence(3, false) made on this object?

Answers

The call makeSentence(3, false) will return

"Object is not very very very regular"

The program fragment is:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

private String descriptor;

public String makeSentence(int quant, boolean sign) {

   String s = "Object is ";

   if (! sign) {

       s += "not ";

    }

   for (int i = 0; i < quant; i++) {

       s += "very ";

   }

   return s + descriptor;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

descriptor is an instance field of the class. When makeSentence(3, false) is called, it does the following;

Initializes a local variable s with "Object is "

s now contains "Object is "

Since sign== false, the if block executes

s now contains "Object is not "

The for loop will execute 3 times to append "very " to s

s now contains "Object is not very very very "

Finally the return statement returns a concatenation of the contents of descriptor (descriptor=="regular") and s

s now contains "Object is not very very very regular"

Learn more about programs here: https://brainly.com/question/19625875

Identify the link element that accesses a style sheet file named output. Css only when the device is a printer or a projection device.

Answers

There are different types of link element. The link element that accesses a style sheet file named output is:

<link href="output.css" media="print, projection" />

Style sheets often shows a key growth for Web page designers, widening their ability to boast the appearance of their pages.

In the web environments, people are very concerned with the content of their documents than the way it was presented.

There are techniques that often work for some of the people but not for all of the people and there is need therefore to make new techniques.

Learn more about link element from

https://brainly.com/question/25608430

If you used D*n as the criterion in a Short Text field called FirstName, what would appear in that field in the query results

Answers

When querying a list or table, the use of wildcard symbols maybe used to optimize the search result. The words D*n will return First names which starts with D and ends with n.

The (*) denotes that the search returns any values or alphabets inbetween D and n.

Names such as Dean, Don, Drezn and other rated names would be included in the returned query.

Therefore, the returned query would include names starting with the letter D and ends with the letter n.

Learn more : https://brainly.com/question/25586700

You have installed Windows Server 2016 on a new server and want to centralize user logons and security policies. What type of software should you install and configure on this server

Answers

Answer:

Directory Service

Explanation:

The type of software that you should need to install and configure on this server is known as the directory services such as Microsoft office.

What is Software?

Software may be defined as a set of instructions, data, or programs which are considerably utilized in order to operate computers and execute specific tasks with respect to the instructions. The function of the software is absolutely the opposite of the hardware.

According to the context of this question, each and every directory service have some special class of software that enables the window to install and configure Microsoft's proprietary. These proprietaries mutually support the window and execute the function with respect to the user's instructions.

Therefore, the directory service is a type of software that you should need to install and configure on this server.

To learn more about Software, refer to the link:

https://brainly.com/question/28224061

#SPJ2

________ software consists of operating systems, utilities, device drivers, and language translators.

Answers

Answer:

"System"

Explanation:

System software consists of operating systems, utilities, device drivers, and language translators.

(not much explanation as it was a fill in the blank which explains itself haha)

Have a nice day!

    I hope this is what you are looking for, but if not - comment! I will edit and update my answer accordingly. (ノ^∇^)

- Heather

What color object would reflect more light?
O Red
O Black
O Blue
o White

Answers

Answer:

White

Explanation:

Red absorbs all light except red light, which it reflects

Black absorbs all light

Blue absorbs all light except blue light, which it reflects

White reflects all light because it has all colors except black.

Hope you do well!

Other Questions
One x-intercept for a parabola is at the point (-0.4,0). Use the quadratic formula to find the other x-intercept for the parabola defined by this equation: y = 5x2 + 7x + 2 Separate the values with a comma. Round, if necessary, to the nearest hundredth. What type of shock occurs when bacterial toxins trigger vasodilation and increase capillary permeability Explain why understanding wind patternswould better help early explorers travel. How to calculate opportunity cost ppf. Do you think that virtual reality workouts could help people stick with working out or do you think it's a gimmick that will fade?? 1. BC=DAhow do i find the reason The main point of this paragraph is to1. trace the roots of our public libraries today.2. paint a picture of daily life in ancient cities.3.show why kings and queens collected books.4.teach the reader facts about ancient libraries. 2. How many tens are in 9 hundreds? Given isosceles AHIJ where HIIT, MZH = (3x + 10)", and mZ1 = (6x 20)", find the measures of angles H, I and J. Wha ratio is equivalent to the ratio 6 : 12 y=6x-5 convert the equation to standard form Please Help! Angle 3 is equal to angle __. Does anyone listen to tom macdonald Sometimes a person looks to others to determine whether help needs to be offered in an ambiguous situation. When this person incorrectly concludes that no help is necessary, this is called ________ ignorance. Group of answer choices deindividuated countersocial collective pluralistic What is the equation of this line in slope-intercept form? (-1,5) (1,-1)y = 3x - 2 y = -1/3x + 2y = -3x + 2y = 3x + 2 Refer to the question above to help answer this question. If the students were to redo their experiment with the water and the antiacid tablet, what would you recommend they do in order to show that the mass was conserved in that chemical reaction. a. They should put a cover on the beaker so nothing can escape during the experiment. b. They should use two antiacid tablets instead of one. c. They should use more water. d. They should get a new scale and double check their measurements. Find a formula for the inverse of the following function, if possible.[tex]P(x) = 3\sqrt[3]{x} - 1[/tex][tex]P^{-1}(x) = \\\\[/tex]or does not have an inverse function 16 + ((15 + 5) + 32) A block of mass =4.20 kg slides along a horizontal table with velocity 0=3.50 m/s . At =0 , it hits a spring with spring constant =26.00 N/m and it also begins to experience a friction force. The coefficient of friction is given by =0.250 . How far has the spring compressed by the time the block first momentarily comes to rest? Assume the positive direction is to the right. What is an equation of the line that passes through the points (0,-2) and (-5,4)