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
If I had to choose the class I prefer it would be a
dmitriy555 [2]
How about you prefer no class
4 0
3 years ago
Shapes in the Shapes gallery can be combined to show relationships among the elements.
LUCKY_DIMON [66]
Yes, this statement is true.
Actually this statement is about using Microsoft PowerPoint, shapes in the shape gallery can be combined to show relationships among the elements.
In the shape gallery of Microsoft PowerPoint, there are many shapes such as oval, square, rectangle, star, line and many more. One can use any shape to illustrate the concept or to show relationship between something.
8 0
3 years ago
Write a program to define three variables to hold three test scores. The program should ask the user to enter three test scores
Elza [17]

Answer:  

It's always good to use if else with boolean expressions in such cases.

Explanation:

I have written a program  where I have used c# as programming language.

I used if else block with boolean expressions to enforce conditions to print the grades according to the average of test scores. I have used Logical And(&&) operator in boolean expressions so that all the conditions in if and if else  must be true

Here is the program:  

using System;

public class Test

{

   public static void Main()

   {

       int testScore1, testScore2, testScore3;

       Console.WriteLine("enter first testScore");

       testScore1 = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine("enter second testScore");

       testScore2 = Convert.ToInt32(Console.ReadLine());

       Console.WriteLine("enter third testScore");

       testScore3 = Convert.ToInt32(Console.ReadLine());

       float avg = (testScore1 + testScore2 + testScore3) / 3;

       if(avg>=90)

       {

           Console.WriteLine("You got grade A");

       }

       else if(avg >=80 && avg <=89)

       {

           Console.WriteLine("You got grade B");

       }

       else if (avg >= 70 && avg <= 79)

       {

           Console.WriteLine("You got grade c");

       }

       else if (avg >= 60 && avg <= 69)

       {

           Console.WriteLine("You got grade D");

       }

       else if(avg< 60)

       {

           Console.WriteLine("You got grade E");

       }

       else

       {

           Console.WriteLine("Sorry, You failed");

       }

       Console.ReadLine();

   }    

}

Explanation of program:  

I created three variables named, testScore1, testScore2, testScore3 of datatype int. I prompted the user to enter three test score values. Each value is read using Console.ReadLine() . As the value entered is of type integer, I converted the  console read value into int using Convert method.  

In the next step, I calculated average using the formula.  

Now, Based on the average, I can calculate the grade according to the given grading scheme.

7 0
3 years ago
Write the definition of a function named swapints that is passed two int reference parameters. The function returns nothing but
Alja [10]

Answer:

void swapints(int *j,int *k)//Function definition.

{

   *j=*j+*k-(*k=*j); //value swapping.

}

swapints(&j,&k);//call the function.

Explanation:

  • The above function definition takes the address of j and k variables which is stored on the pointer variable j and k.
  • Then the pointer variable uses the j and k value for the above expression, and the user does not need to return the value of j and k.
  • But when the user prints the value of the j and k variable, then he gets the swapping value of the j and k variable.
  • The user needs to know that the "int j" is a normal variable, but "int *j" is a pointer variable that is used to take the address of j variable.
3 0
3 years ago
Identify some possible delivery systems for video programs
Rzqust [24]

Some possible delivery systems for video programs are:

  • Radio broadcast frequency
  • Coaxial cable
  • Satellite
  • Optic fiber
<h3>Which program delivery methods work the best?</h3>

The first technologies for distributing videos to the general public were historically terrestrial broadcast TV systems. Following these systems naturally and with great success were cable and DTH (direct to home) satellite technologies.

In the past, these systems have been installed on-site using hardware, networks, and other links that were especially created for the purpose of transmitting video feeds between various facilities and entities in the supply chain.

Therefore, These are the five different ways that learning is delivered: face-to-face instruction, virtual classrooms, online learning, blended learning, and mobile learning.

Learn more about delivery systems from

brainly.com/question/28420229

#SPJ1

7 0
1 year ago
Other questions:
  • Today, air travel allows large numbers of people to move quickly over long distances. Which of the following is a likely effect
    8·1 answer
  • Look at the four schematic symbols shown in the figure above. Each of the symbols is labeled with a number. Which of the followi
    5·2 answers
  • Consider that a large online company that provides a widely used search engine, social network, and/or news service is consideri
    12·1 answer
  • Given the following code fragment, what is the data type of roster[9] .name? struct student { string name; double gpa; }; studen
    5·1 answer
  • Design a method for representing the state of a tic-tac-toe board in computer memory. can you fit your representation into three
    12·2 answers
  • Most Internet users access commercial websites, which have higher-quality information because of higher editing standards and th
    12·1 answer
  • Analyze the problem statement. Select the correct answer. Vision: We want to decrease errors in our billings to clients. Issue:
    5·1 answer
  • Explain what happens if you try to open a file for reading that does not exist.
    10·1 answer
  • The insert options button lists formatting options. true or false.
    11·1 answer
  • The main part of your program has the following line of code.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!