Question: C# coding The program DebugTwo1.cs has syntax and/or logical errors. Determine the problem(s) and fix the program. THIS IS THE CORRECT ANSWER: // Program compares

C# coding

The program DebugTwo1.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.

THIS IS THE CORRECT ANSWER:

// Program compares your name to the name of your boss

using System;

using static System.Console;

class DebugTwo1

{

static void Main()

{

string name,bossName;

bool areNamesTheSame;

Console.WriteLine("Enter your name");

name=Console.ReadLine();

Console.WriteLine("Hello {0}! Enter the name of your boss",name);

bossName=Console.ReadLine();

areNamesTheSame=false;

if(name==bossName)

{

areNamesTheSame=true;

}

Console.WriteLine("It is {0} that you are your own boss",areNamesTheSame);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!