A shop owner wants to create stock codes for each type of sweet they sell. Figure 5 shows some of the sweets.
| sweetID | sweetName | brand |
|---|---|---|
| S1 | WINE GUMS | MAYNARDS |
| S2 | COLA CUBES | BERRYMANS |
| S3 | STARBURST | WRIGLEY |
- A stock code is made up of the sweetID.
- It then uses the first letter and the second letter in sweetName.
- It then uses the first letter of the brand.
For example, the stock code for WINE GUMS would be S1WIM, and the stock code for STARBURST would be S3STW.
Write a C# program to create the stock code for a sweet. The program should get the user to enter the sweetID, sweetName and brand; create the stock code; and assign the stock code to a variable called code. Use meaningful variable name(s) and C# syntax.
Your answer