subject

Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of that 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. 1 #include 2 #include 3 using namespace std; 4 5 int main() { string workStr; 7 int idxBegin; 8 int choicelen; 9 string strSelection; 10 11 getline(cin, workStr); 12 cin >> idxBegin; 13 cin >> choiceLen; 14 15 * Your code goes here */ 16 17 cout << strSelection << endl; 18 return; 19} 1 2 3 4 Check Next level

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
George is working as a programming team lead. which statements correctly describe the skills that he requires?
Answers: 3
You know the right answer?
Given a string, an integer position, and an integer length, all on separate lines, output the substr...
Questions
Questions on the website: 13722361