Hello, I’m working on this task:
Write a program that creates an int variable codePart with the value 333. Then create another int variable with name code and assign a value that is twice the codePart variable value. Your program should output:
Self-destruction started. The code is
666
Here is my code:
public class LaunchSelfDestruction
{
public static void Main(string[] args)
{
int codePart = 333;
code = codePart * 2;
int result = codePart * code
Console.WriteLine("Self-destruction started. The code is");
Console.WriteLine(code);
}
}
Can anyone please help me to solve it?