Hey guys good morning or good evening or whatever :DDDD
I am doing my school work and I've ran into a problem.
I dont really know how to write the code.
8 - n ( how many lines)
3 4 10 13 ( what numbers need to be removed)The 3 means how many numbers there are.
2 2 11 (what numbers neeed to added back)The 2 means how many numbers there are.
1
3
4
7
9
10
13
14
The equation asks me to remove the numbers and add the other numbers.
The answers should be like this
Nr. 1
Nr. 3
Nr. 7
Nr. 9
Nr. 14
Nr. 1
Nr. 2
Nr. 3
Nr. 7
Nr. 9
Nr. 11
Nr. 14
I don't really know how to start and how to write it. (P.S the addding and removing have to be diff functions);
I know how to remove and add a single number but not multiple :(.
Any help or tips would be great
#include <iostream>
#include <cctype>
#include <limits>
int main()
{
std::cout << "Do you want someone to do all the work for you? ";
char answer{};
std::cin >> answer;
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
if (std::toupper(answer) == 'Y' ) { std::cout << "Post it in the Jobs section.\n"; }
else { std::cout << "Show what you have coded so far.\n"; }
std::cout << "Good luck.\n";
}