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

I recorded a video on my windows PC, but when i tried to play it i got this message:

Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file

is there a free online way i can fix this

Answers

Answer:

rename the file then type ".MP4" at the end and it should work

by the way big warriors fan as well

Explanation:

Civilization V is a game that can be won in a number of ways, including maximizing your civilization's diplomatic, scientific, or cultural standing, making it so the player is intensely focused on winning the game. This is an example of what type of immersion?

Tactical immersion
Strategic Immersion
Non-player immersion
Pseudo immersion

Answers

Answer:

Strategic Immersion

Explanation:

Strategic Immersioninvolves the player being intensely focused on winning the game and weighing all their actions in terms of maximizing their chances

what are foundations of any game systems that control what the players can or cannot do in the game, as well as the penalties, reward, and other consequences that result from the players actions?

rules

feedback

tasks

algotithms

Answers

Answer:

A. Rules

Explanation:

Rules can determine what can be done and what cannot be done... giving it restrictions, or RULES in a video game among-st a player

If, in a recursive solution, function A calls function B which calls function C, this is called ________ recursion. indirect three function call direct continuous

Answers

If, in a recursive solution, function A calls function B which calls function C, this is called Indirect recursion.

A recursive algorithm is said to be recursive if such an algorithm calls itself with smaller input values and get current result for implementing basic operations on those simple inputs.

Indirect recursion occurs when a function A invokes another function B which in turn makes it the original function and calls another function C.

Learn more about recursion here:

https://brainly.com/question/3169485?referrer=searchResults

_______________ is research in the design and the use of computer technology, which focuses on the interfaces between people and computers.

Answers

Answer:

______HUMAN- COMPUTER INTERACTION_________ is research in the design and the use of computer technology, which focuses on the interfaces between people and computers.

Explanation:

HOPE ITS HELP

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!

The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on the directory only allow the user and group owners to view the contents of the directory. Users who are not part of the group owner are unable to list the contents of the directory.

As part of a new company policy to increase teamwork, you want to allow all users to be able to see the /sales directory and list its contents. You also want to let all users open, but not change, any document inside that directory.

Task:

Allow the other group to browse the /sales directory.

Modify permissions on all files in the /sales directory to allow members of the other group to view but not change the file.
Type:

chmod o+rx /sales

Answers

Answer:

it should be d

Explanation:

please mark this as brainlists i could really use it

File permissions are often set or changed using “Change Mode.” o+ Add permission for “others” with – (remove) r (other possible options include u (user) and g (group)). Permission is read. Implement permission (other possible values include w – write permission)

What is main function of the chmod?

What permission—read (r), write (w), or execute—is third? (x). You would enter chmod o+rx [filename] to add world read and execute permission to a file using symbolic mode. You would type chmod o-r [filename] to make a file world read-only.

— rw-r—r— (644) — Group members and others can only read; only the user has read and write access. — rwx——— (700) — Reading, writing, and executing are all restricted to the user.

Therefore, RWXRXRX (755) — Only the user and the group and others can read and execute; the user has read, write, and execute permissions.

Learn more about chmod here:

https://brainly.com/question/14187643

#SPJ2

Select the correct text in the passage.
Which three phrases describe a wireframe?

Tracy uses a (pictorial summary of an entire website) in her team meeting. It is a (two-dimensional illustration) of how (each web page on a website will look.) Known as a workflow diagram, this (explains how pages in a website connect to one another.) It is a (design tool), and it (shows the overall framework of a website.) It is a (visual representation of how much space each element on a page should take.)

Answers

Answer:

A B D

Explanation:

A technology ____ begins with the birth of a new technology and ends when that technology reaches its limits and dies as it is replaced by a newer, substantially better technology.

Answers

Answer:

A technology __cycle __ begins with the birth of a new technology and ends when that technology reaches its limits and dies as it is replaced by a newer, substantially better technology.

Explanation:

Hope its help

A file ____ shows the location of a file or folder

Answers

Answer:

Path

Explanation:

correct answer: Path

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

In object-oriented programming, a data member plays the role of _________. a. an attribute b. a behavior c. either a or b d. neither a nor b

Answers

In object-oriented programming, the object consist of both the data and the functions that operate on the data. In object-oriented programming, a data member plays the role of neither A nor B.

Objects are the product of abstract data types that has inside of it both data and function altogether.

A data member often has different classes. They can be private or public.

Object-oriented programming (OOP) is simply known as a computer programming model that put together software design around data, or objects.

Learn more from

https://brainly.com/question/12342989

If you want to share information with individuals who are internal to your organization, which type of network would you want to use

Answers

it is globe because I want a successful the all people

A customer reached out via Twitter Direct Message to your company, looking for support with a complex issue. A co-worker was already helping that user but is away on vacation. Which Hootsuite feature would be best to respond with?

Answers

The Hootsuite platform provides tools that enable a person to manage his social media activities in one spot. The Hootsuite feature that would be best to respond with given the above scenario is;

Hootsuite inbox

Using the Hootsuite inbox, a user can access the private and public conversations between a former user and a client.

You can see the post that prompted the customer to speak with the organization's representative.

After reading through the conversations, you can reply the client and take any step that is required of you.

Learn more here:

https://brainly.com/question/15321261

The implementation stage of the SDLC is when the system is moved into operation where it can be used. What stage PRECEDES the implementation stage and what happens in this preceding stage

Answers

The stage that precedes the implementation stage of SDLC is testing and it involves checking the functionality of the system.

System design involves the process of determining an overall system architecture, which typically comprises the following:

Hardware.End users.Physical processing components.Software.Communication channel.

Generally, there are seven (7) main stages in the systems development life cycle (SDLC) model and these include:

1. Planning.

2. Analysis.

3. Design.

4. Development.

5. Testing.

6. Implementation.

7. Maintenance.

From the above, we can deduce that the stage which precedes the implementation stage of SDLC is testing.

During the testing stage of SDLC, a quality assurance (QA) expert checks the system to determine whether or not it is functioning properly before it is deployed for operation, which is where the system can be used.

Read more: https://brainly.com/question/20813142

Why do
ve need to add movies in our slide?

Answers

Answer:

movies are awesome! LOL but i dont understand your question...sadly.

Explanation:

In older languages, you could leave a selection or loop before it was complete by using a ____ statement

Answers

Answer:

D) go to

Explanation:

A) next

B) go next

C) loop

D) go to

D) go to is correct answer

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

Modems communicate data by using which method?.

Answers

Considering the modem technology, Modems communicate data by using Radio frequency method.

What is Radio frequency method?

The radio frequency method in modem communication allows modems to communicate or transfer data through wireless over a distance of tens of kilometers.

The essence of Radio frequency in modems

With radio frequency, modems can easily communicate without telecommunication or satellite network operators. It usually performs at 300 MHz to 900 MHz range.

Hence, in this case, it is concluded that the correct answer is the Radio frequency method.

Learn more about modem technology here: https://brainly.com/question/9617717

AI is not embraced everywhere in every industry because _______.

Answers

Answer:

See below:

Explanation:

AI is not embraced in every industry because of the type of industry and what it requires. In some situations, a human is needed since an AI cannot determine what to do and can sometimes even cause death.

AI isn't embraced everywhere because for some things we need a person, lets say for example, we need an AI to respond to 911 calls, that simply won't work due to the many situations and training the bot too will be a nightmare. For example, if a caller says a word that normal humans can understand, or a "code word" that every human knows but they haven't bothered to tell the bot, that will be the end of the line for them.

There are mutliple reasons to not use AI depending on the situation whether its life and death or just plain impractical.

Until 2016, the popular song _____ was covered by copyright law, unusually long after it was written in 1893.

A.
Happy Birthday

B.
Merry Christmas, Everyone

C.
Hava Nagila

D.
Auld Lang Syne

Answers

Answer: Happy Birthday

Explanation:

Answer is A. Happy Birthday

Bob has started a company and registered its name with the government as a private corporation. He tries to create a domain name using that registered name along with his country code. The name has already been registered by someone else. What should Bob do

Answers

Answer:

bobo

Explanation:

I am malala how one girl stood up for education and changed the world pdf.

Answers

Answer:

what?

Explanation:

DES is a commonly used symmetric encryption algorithm, developed in the mid-1990s by the American government in conjunction with IBM, and is the recommended encryption algorithm for highly sensitive data. True False

Answers

Answer:

False

Explanation:

The DES encryption standard is believed to be weakened by the American government by containing shortened key lengths and 'S-boxes' of unknown origin.

Pedestrians, bicyclists, and skateboarders _____ the rules of right-of-way when they use the road.

Answers

Pedestrians, bicyclists, and skateboarders must follow the rules of right-of-way when they use the road.

Write any four causes of cyber crime

Answers

A Lack of Empathy
The Victim Deserves It
Self-loathing
It Becomes an Addiction

A common attack in which a client's cookies, security tokens, or other personal information is obtained and used to impersonate the user is referred to as

Answers

Answer:

Identity Theft. i hope this helps :D

In a complex formula, how does excel determine which calculation to perform first?.

Answers

In a complex formula, the way excel determines which calculation to perform first is that; It follows the order of operations.

When carrying out calculations in excel, if we don't bracket certain operations, excel will use the order of operation called BODMAS to determine which operation to carry out first.

For example, if excel wants to solve 3 × 4 + 7 - 2;

The acronyms in BODMAS stand for;

B - Brackets

O - Orders (powers/indices or roots)

D - Division

M - Multiplication

A - Addition

S - Subtraction

Now, it means that the first action it will perform is Bracket while the last will be subtraction.

In our example, excel will first use the multiplication sign to get;

(3 * 4) = 12

Then addition; 12 + 7 = 19

Then subtraction; 19 - 2 = 17

Read more on BODMAS at; https://brainly.com/question/16788360

________ 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

5G can support more users simultaneously than LTE, but it may not provide any improvements in terms of data rates. True or False

Answers

It looks like it should be true because I learned it from my dad

3 out of 5 citizens were eligible to vote 180 actually voted

Answers

Answer:

What is the question.

Explanation:

Answers:

Either 108/180

or 180/300

Depending on question since I dont know what ur asking

Angular when to use reactiveformsmodule.

Answers

Answer:

Image result for Angular when to use reactiveformsmodule.

In summaries, if forms are very important for your app, or reactive pattern are used in your app, you should use reactive forms. Otherwise your app have basic and simple requirement for forms such as sign in, you should use template-driven forms

Explanation:

Each form has a state that can be updated by many different interactions and its up to the application developer to manage that state and prevent it from getting corrupted. This can get hard to do for very large forms and can introduce a category of potential bugs

Other Questions
A 11 foot ladder is placed against a building. If the base of the ladder is 7 feet away from the building, how far up the building will the ladder reach? Round the answer to the nearest tenth. Quadrilateral HUJK has coordinates H(2, 3), 1(2, 6), J(-1, -8), and K(-2, 4). If the quadrilateral istranslated and H' (the image point of H) is located at (6, 2), find the coordinates of J' (theimage point of J). which best describes the relationship between the 125 angle and angle a What else is required to prove the triangles are congruent using SAS?See picture for full problem. Please and thank you so much! Can my grade go up to an A within 3 weeks if i just do class work? 2. A solution NaF is add dropwise to a solution that is .0122 M in Ba . When the concentration of F exceeds ______M, BaF2 will precipitate. Neglect volume changes. BaF2 K Pedro is a diligent student. He always finishes all his school requirements on time. It can be assumed that BLANK?A. A diligent students has good grades. All students are diligent.B. All students are diligent. 1. What is the ratio of 10 notebooks to 5 ballpens in simplest form? What is the texture of the first 7 seconds of this excerpt, from the fourth movement of Beethoven's Symphony no. 5 In circle O, what is mArc A E? ASAP PLZZZ HELPMUST BE AT 4 SENTENCES. From what we've learned about the first 5 Early Republic presidents, which one do you think was the most successful managing the domestic and/or foreign policy issues of their presidency? Give at least two examples of their leadership and why you think they were successful. Simplify. 5102221025 what is nepotism? a. when a government official is illegally elected b. when a government official appoints a family member to a job c. when a government official is promoted d. when a government official appoints a friend to a job What most likely caused these trees to fall over?I will give brainlest to first answer, not most detailed I need help with this also I had was to repost it again because someone deleted it What economic policy did Secretary of the Treasury Andrew Mellon favor? A breaking up monopolies and protecting the rights of workers B restricting the absolute freedom of business leaders C advancing business interests and lowering taxesD lowering tariff rates on foreign imports The structure that regulates air pressure between the external atmosphere and the middle ear cavity is known as the: Ten less than the product of a number and 45. evaluate 1/4 (15 + h) - g , when h=5 and g= 1 write the equation of the line passing through the origin of the coordinate system and is parallel to the line x-2y+3=0