0
#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{


    cout <<"enter the problemset and number""\n";
    //problems represents name and numbers
    string problems;
    string problem_name_and_numbers=problems;
    string numbers;
    char quote;
    int total_length=problems.length();
    //gather name
    if(cin.peek()=='"' || cin.peek() == '\'')
    {
        cin >>quote;
        getline(cin,problems,quote);
        int problemslength=(problems.length()+1);
        int difference=total_length-problemlength;
        numbers=problem_name_and_numbers.substr(problemlength,difference);
    }
    else
    {
        getline(cin,problems);
        int problemslength=(problems.length()+1);
        int difference=total_length-problemlength;
        numbers=problem_name_and_numbers.substr(problemlength,difference);
    }

    //gather problem numbers

    return 0;
}
2
Contributors
4
Replies
7
Views
8 Years
Discussion Span
Last Post by lotrsimp12345
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.