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

Yahoo Messenger is an example of a/an __________ service on the Internet.

Answers

Answer:

Yahoo Messenger is an example of a service on the Internet.

INSTANT MESSAGING SERVICE, which includes text messaging, voice calling and file sharing.

Pls name me brainliest!!! ;D

What is the difference between compliled and intebrated language?

(class 8th Subject Computer chapter 9 Control Structures In Python) ​

Answers

Answer:  

A compiled language is a programming language whose implementations are typically compilers and not interpreters. In this language, once the program is compiled it is expressed in the instructions of the target machine. There are at least two steps to get from source code to execution. While, an interpreted language is a programming language whose implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. While in this language, the instructions are not directly executed by the target machine. There is only one step to get from source code to execution.

I hope this helps.

Answer:

1.

Compiled Language:

A compiled language is a programming language whose implementations are typically compilers and not interpreters.

Interpreted Language:

An interpreted language is a programming language whose implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions.

2.

Compiled Language:

In this language, once the program is compiled it is expressed in the instructions of the target machine.

Interpreted Language:

While in this language, the instructions are not directly executed by the target machine.

3.

Compiled Language:

There are at least two steps to get from source code to execution.

Interpreted Language:

There is only one step to get from source code to execution.

4.

Compiler Language:

In this language, compiled programs run faster than interpreted programs.

Interpreted Language:

While in this language, interpreted programs can be modified while the program is running.

Conceptually, a page table is an array. What is found in each element of the page table array, and how is it interpreted?.

Answers

An array is the group of data structure which has a similar data elements of the same data type. In this type of data structure, the information can be quickly recalled by making use of the index number so that each individual data can be retrieved.

With this in mind, we can see that a page table has to do with the data structure which is stored in a virtual memory so that the Operating System can access their virtual and physical address.

See attached image for a better visual description.

Please note that your question is incomplete so I gave you a general overview so that you would better understand the concept.

Read more about page table here:

https://brainly.com/question/15409133

Since the advent of online writing, our audience:

A. has grown much larger

B. rarely reads what we write

C. has become disinterested

D. usually comprises one person​

Answers

Answer:

C............. I think

Since the advent of online writing, our audience: A. has grown much larger.

Writing refers to an act (process) of using alphabets and writing symbols to communicate ideas, emotions, and thoughts in a readable form.

On a related note, online writing can be defined as a process that involves writing and making a literary work (piece) solely available for an audience over the internet.

Generally, the audience for online writing has grown much larger, as a result of technological advancement and the availability of communication devices such as:

SmartphonesLaptopsPalmtopse-diaries

In conclusion, our audience has grown much larger since the advent of online writing.

Read more on online writing here: https://brainly.com/question/10354868

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:

Match each Animation category to its description

Answers

Answer:

Your photo is 100% correct

Explanation: protect question from longwinded or poor answers complete.

Motion path: move object on screen. Emphasis: make an object stand out. Entrance: move an object top the frame. Exit: move object out of the frame.

What is animation?

Animation is the process of creating the illusion of motion and change by rapidly displaying a sequence of static images that minimally differ from each other.

The terms commonly used in animation and video production:

The path that an object takes as it moves across the screen is referred to as its motion path. A straight line, a curve, or any other shape or pattern can be used.

The use of animation techniques to draw attention to a specific object or element on the screen is referred to as emphasis. This can be accomplished by utilising colour, size, movement, or other visual effects.

The animation of an object as it enters the screen or frame is referred to as its entrance. This can be accomplished through the use of various techniques such as a slide, a fade-in, or a zoom-in effect.

Exit: the animation of an object leaving the screen or frame. This can be accomplished through the use of various techniques such as a slide, a fade-out, and so on.

Thus, this can be the match for the given scenario.

For more details regarding animation, visit:

https://brainly.com/question/29996953

#SPJ3

How to edit slides into video.

Answers

Answer:

use videostar. or funimate. but for school use powerpoint

Explanation:

Browser software can be set to update automatically, or require manual intervention. Which is preferred

Answers

A browser, also known as web browser is used to surf the internet.

Automatic and manual updates of the web browsers are based on the user preference

Updating one's browser implies that the user wants to have the latest software experience of the browser, provided by the software developer.

Automatic or manual update of the web browser is usually based on the user preference, and several other factors such as:

Network switches.System vulnerability.Unreliable updatesProvision to revert to a previous update.

The above factors and few others can influence one's decision of software updates.

Read more about software updates at:

https://brainly.com/question/25604919

i will give brainliest to the best answer. what is a good screen recorder

Answers

Answer:

If your on windows there is an x-box screen recorder installed on it. thats a new windows 11 update. If not, i used to use x-split broadcaster

Explanation:

If your on windows there is an x-box screen recorder installed on it. thats a new windows 11 update. If not, i used to use x-split broadcaster

mark me Brainliest

Daphne has determined that she has malware on her linux machine. She prefers to only use open-source software. Which anti-malware software should she use?.

Answers

Answer:

ClamAV is the open source antivirus you can in your Linux machine.

ClamAV is one of the best open-source anti-malware software for Linux machines.

What is malware?

Any program or file that purposefully hurts a computer, network, or server is known as malware or malware. Computer viruses, worms, Keyloggers, extortion, and spyware are examples of infection.

By analyzing all received packets to stop malware from being launched and infiltrating a computer, antiviruses can assist in preventing malware attacks. Antimalware software can also identify sophisticated malware and provide defense against ransomware assaults.

Hence "One of the top free anti-malware programs for Linux systems is ClamAV".

To learn more about malware,

https://brainly.com/question/22185332

#SPJ12

What type of loop allows you to indicate the starting value for the loop control variable, the test condition that controls loop entry, and the expression that alters the loop control variable, all in one convenient place

Answers

Answer:

I think it's a for loop.

A for loop looks like:

for (starting statement; condition that is true; condition applied to iteration)

Explanation:

______ focuses on filtering data as it enters the system to determine which data to keep and which to discard.

Answers

The answer is Stream processing

it is possible to be logged into a wi-fi network that does not have internet access.

Answers

Answer:

yes it is possible. it'll take some work tho

Explanation:

you would have to bypass the security and disable the proxy and go through the firewall and do some other things to access it

Bootmgr starts and reads data from a(n) ________ file that contains information about the various operating systems installed on the system.

Answers

BCD file. Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings.

How to emit from jquery in angular 8.

Answers

Answer:

idek what you just said

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

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.

Which action must take place inside a procedure to reserve space on the stack for two doubleword local variables

Answers


after MOV EBP,ESP, subtract 8 from the stack pointer (ESP)

AND, NOT and OR are comparisons of values included in which type of operation?

Answers

Answer:

Comparison Operators

Explanation:

Answer:

comparative operation

Explanation:

not need

PLEASE HELP ME FASTTTTTT Input statements allow the user to enter data that a program uses to perform necessary computations. Users enter the data when they the program.

Answers

Answer:

The scanf() is the function that is used to take inputs from the user with the help of the standard input device,i.e, the keyboard.

scanf() function is capable of taking any data type as an input, though it has to be specified first like %d for integers, %s for strings and %f for floating-point type. The gets() function can only take a string as an input.

Explanation:

Answer:

ur

Explanation:

ur mom

________ 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 are the names of the methods which are used to control an i/o device??.

Answers

Answer: 1

Explanation:

i took the quiz and it was correct

Question 10 of 10
Your company emphasizes the important of conserving (not wasting)
resources. How can you support that value when you print an 8-page report
you were asked to bring to your department's monthly meeting?
O A. Use the Print option for two-sided printing.
OB. Use the Print option to create extra copies.
C. Post the report online before printing it.
O D. Use the Save option to choose a format readers can open.

Answers

D, because it will save paper and not go to waste

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

Chapter 20 reading and vocab review

Explain the subtractive and additive approaches to editing.

Answers

Answer:

Essentially additive editing and stringing “the good stuff” together, whereas subtractive is more about stringing all your raw footage together and “removing the bad stuff”

Additive editing feels confident and concerned with the pursuit of a specific, existing vision. And it’s faster. Subtractive editing feels like a deeper listening to what the footage is saying, and holding on to many potential permutations.

Explanation:

Addictive editing -  creating a program from raw footage by starting by starting with nothing and adding selected components

Subtraction editing  - creating a program by removing redundant or poor quality material from the original footage

Write any four causes of cyber crime

Answers

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

In order to help prevent collisions with motorcycles, one of the hosts of the video recommends thinking of motorcycles as __________. A. fast-moving bicycles B. occupying a space the same size as a car C. unpredictable road users

Answers

There are lot of accidents on the high way due to motorcycles. In order to help prevent collisions with motorcycles, one of the hosts of the video recommends thinking of motorcycles as occupying a space the same size as a car.

There are some recommendations following distance when traveling behind a motorcycle. it is often longer for motorcycles than the normal two seconds that are recommended when following most vehicles.

The best recommendation is to give a three or four second  distance when travelling behind a motorcyclist.

Motorcycles often stays at your blind spot and you may not see them. This can lead to an unwanted collision and result in serious injury or death. It is best you give much space as you would a normal vehicle.

Learn more from

https://brainly.com/question/13408307

In a computer network, a _____ server is a specialized server that manages resources for the network.

Answers

Answer:

Directory Server

Explanation:

Maps network resources, such as files and user accounts, to network addresses. This allows the resources on a network to be discoverable.

Which type of security is specifically concerned with computers or devices that are part of a network infrastructure

Answers

Answer:

Ransomware

Explanation:

"Ransomware is malicious software that threatens to reveal sensitive data or prevent access to your files/systems until you pay a ransom payment within a set timeframe."

Fill in the blank with the correct answer.

Question 1 options:

1) options


2) view


3) selection


4) history


5) navigate

1.
The ______ panel records user operations and can be used to reverse changes made to an image.

2.
The ______ panel is used to pan an image and zoom in and out

3.
The ______ bar displays options available for selected tool.

4.
The Actual Size and Fit Screen options are available in the ______ menu.

5.
The Lasso, Marquee, and Wand tools are examples of ______ selection tools.

Answers

Answer:

1. history

2. view

3. Selection

4. options

5. navigation

Explanation:

Hoped this helped. I am un-sure of a few.

Other Questions
Help me pleaseeeeeeeeeeeeeeee a remembrance of what muhammad said or did is called Suppose that you borrow $16000 for 5 years at 8% toward the purchase of a car. Find the monthly payments and the total interest for the loan. Identify the number that does not belong with the other three. Explain your reasoning. negative 10 over 2, negative 13.4, square root 18, 22.7 repeating 7 A block slides down a smooth ramp, starting from rest at a height h. When it reaches the bottom it's moving at speed v. It then continues to slide up a second smooth ramp. At what height is its speed equal to v/2 Your mom decides she will give you $8, instead of $5 for each chore. You complete 12 chores. Will you have enough money for the lego set? Which of the following statements best goes with the Law of Conservation of Energy .3(4x + 3) + 4(6x + 1) = 43What is the answer? when Anna buys 3 pencils, she spends a $1.50. Each pencil cost the same ness ofare toxicWhich best describes the use of rhetorical elements inthis passage?causes principleCiting an expert appeals to logos by reinforcingreasoningO Loaded language appeals to the audience'semotionsN.Humor contributes to the author's credibilityRebuttal undermines the counterargumentA then aecause, forts oftenaying, inal war isrossfire. the plan that pleased both northern and southern states regarding representation was called the virginia plan In an earlier chapter you calculated the stiffness of the interatomic "spring" (chemical bond) between atoms in a block of lead to be 5 N/m. Since in our model each atom is connected to two springs, each half the length of the interatomic bond, the effective "interatomic spring stiffness" for an oscillator is 4*5 N/m = 20 N/m. The mass of one mole of lead is 207 grams (0.207 kilograms).What is the energy, in joules, of one quantum of energy for an atomic oscillator in a block of lead? Write 4 ratio statements to compare the different types of sports balls in the collection. of 6 basket balls 5 base ball balls 3 soccer balls Which one of the following would form a precipitate when mixed with LiOH?A) KNO3B) NH4ClC) Ca(C2H3O2)2D) ZnBr2 ok yall what should i text my crush I'm texting him again but I don't wanna be left on read... During the second half of the 20th century the role of the vice-presidency has:a increasedC. remained the sameb. decreasedd changed greatlyPlease select the best answer from the choices provided Please help me The point D,E,F and G all lie on the same segment, in that order, such that ratio of DE:EF:FG is equal to 4:1:4. If DG=36, find EG the color of flowers are due to the presence of pigments known as:A) Quien fue Benito juares What is the area of this triangle NO LINks OR I WILL REPORT