Hello, I’m working on this task:
Convert the variable types to make the code compile, and output 10 to the screen. You should not change the variable names.
Here is my code:
using System;
namespace PrimitiveTypes
{
class CopyCopy
{
static void Main(string[] args)
{
int a = 10;
short aCopy = (short) a;
byte aCopyCopy = (byte) aCopy;
Console.WriteLine(aCopyCopy);
}
}
}
Can anyone please help me to solve it?
The ai generated help says that it is correct, and the “common help” is very vague, including the normal instructions. the program compiles and outputs 10 as instructed but I keep getting:
Errors from testing your code:
- Local variable ‘a’ does not exist, should be a constant, or has a wrong type.
- Local variable ‘aCopyCopy’ does not exist, should be a constant, or has a wrong type.