I need your help please

Where are you stuck? How much of it can you do?
Last edited on
i just need the code

No. It seems that you should learn and doing that homework by yourself could help you in that.
You have shown that you master copy-paste. Handing you any code is therefore detrimental to you.

You want "expain". Here is some:
* You have to think what logical steps are needed, in what specific order, to solve the problem
* You have to figure out, how to do those steps with programming language

Input
Each of the first two lines contains a bought string.

"Input" -- something has to be read in. See http://www.cplusplus.com/doc/tutorial/basic_io/
One whole line is one string. There are two lines, two strings.
It would be sane to use http://www.cplusplus.com/reference/string/string/getline/ but the question reeks of http://www.cplusplus.com/reference/istream/istream/getline/
i just need the code

Here's some code for you:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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";
}
Topic archived. No new replies allowed.