Hello, I’m working on
Create 4 int variables with different names. Assign them these values: 1000, 2000, 3000, 10000. Using string interpolation, insert those int variables into the strings to get such output:
In one year my salary is going to be 1000 USD
In two years my salary is going to be 2000 USD
In three years my salary is going to be 3000 USD
In four years my salary is going to be 10000 USD
My code
int salaryCount1 = 1000;
int salaryCount2 = 2000;
int salaryCount3 = 3000;
int salaryCount4 = 10000;
string result1 = ($“In one year my salary is going to be {salaryCount1} USD”);
string result2 = ($“In two years my salary is going to be {salaryCount2} USD”);
string result3 = ($“In three years my salary is going to be {salaryCount3} USD”);
string result4 = ($“In four years my salary is going to be {salaryCount4} USD”);
{
Console.WriteLine(result1);
Console.WriteLine(result2);
Console.WriteLine(result3);
Console.WriteLine(result4);
What is wrong? With Console.WriteLine(variable) the same mistake. Can anyone please help me to solve it?