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
Pie
3 years ago
10

Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th

at length.
Ex: If the input is:


Fuzzy bear


3


4


the output is:


zy b


Note: Using a pre-defined string function, the solution can be just one line of code. It does not have to be one line though it can be a lot.


Code:


#include

#include

using namespace std;


int main() {

string workStr;

int indexBegin;

int len;


getline(cin, workStr);

cin >> indexBegin;

cin >> len;


/* Your code goes here */


return 0;

}
Computers and Technology
1 answer:
lana [24]3 years ago
4 0

quetma es elpx mjeghgieo

You might be interested in
When a percentage of the smallest and largest values are deleted from a data set, the mean of the remaining data values is the a
xz_007 [3.2K]

Answer:

Correct option C

Trimmed mean

Explanation:

A trimmed mean is a method of averaging that removes a small designated percentage of the largest and smallest values before calculating the mean.

Trimmed mean helps eliminate the influence of data points on the tails that may unfairly affect the traditional mean.

Trimmed means are used in reporting economic data in order to smooth the results and paint a more realistic picture.

5 0
3 years ago
The code below takes the list of country, country, and searches to see if it is in the dictionary gold which shows some countrie
Lisa [10]

Answer:

Modify your program by replacing

<em>for x in country: </em>

<em>        country_gold.append(gold[x]) </em>

<em>        country_gold.append("Did not get gold")</em>

with

<em>for x in country: </em>

<em>        try: </em>

<em>                country_gold.append(gold[x]) </em>

<em>        except: </em>

<em>                country_gold.append("Did not get gold") </em>

<em />

Explanation:

The addition of try/except clause in the program is to let the program manage error;

In this case, the program checks for a country in the list country; This is implemented using the following line

for x in country:

If the country exists, the statement in the try block is executed

<em> try: </em>

<em>  country_gold.append(gold[x])  -></em><em>This appends the country name to the country_gold list</em>

Otherwise, the statement in the except clause is executed

<em> except: </em>

<em>  country_gold.append("Did not get gold")  -> </em><em>This appends "Did not get gold" to the country_gold list</em>

<em />

<em>To confirm what you've done, you may add the following line of code at the end of the program: </em>print(country_gold)

4 0
4 years ago
Which command let’s you increase or decrease the on-screen magnification of your document
JulijaS [17]
Ctrl - and ctrl +       i hope that is good for you                         
8 0
3 years ago
Businesses today succed or fail based on their ability to need a answer
Whitepunk [10]
The success on the ability
7 0
3 years ago
A Department of Defense (DoD) security team identifies a data breach in progress, based on some anomalous log entries, and take
egoroff_w [7]

Answer: no se

Explanation:

5 0
3 years ago
Other questions:
  • If the motherboard is not getting power, it will not start the boot. ... A four-year old laptop will not boot and presents error
    13·1 answer
  • Given the following HTML form snippet of markup, which of the following user inputs would meet the regular expression rule writt
    7·1 answer
  • What is related to Gamut in Adobe illustrator?
    8·1 answer
  • Omar is preparing to deliver a presentation to his class. It is about a program to collect samples from an asteroid that has bee
    13·1 answer
  • Assume that you have an ArrayList variable named a containing 4 elements, and an object named element that is the correct type t
    9·1 answer
  • When circuit switching is used, what is the maximum number of circuit-switched users that can be supported?
    7·1 answer
  • An individual involved with the aspect of a project will be concerned with budgets and the costs associated with running a busin
    10·2 answers
  • Select the best answer to the following question.
    5·1 answer
  • Fort Nite is the best u can’t say it’s not
    13·2 answers
  • Which open-sourced packet capture tool uses linux and mac os x operating systems?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!