Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C#, determine the syntax and or logical problems in the codetyped below the image. Please post the corrected code in your solution. Thank you.

In C#, determine the syntax and or logical problems in the codetyped below the image.

Please post the corrected code in your solution. Thank you.

image text in transcribed

// This program tells the user the values of the integers thatare
// one more and one less than the entered integer
using System;
using static System.Console;
classDebugTwo4
{
static void Main()
{
string entry;
int enteredInteger;
int more, less;
Write("Enter an integer >>");
entry = ReadLine();
WriteLine("You entered {0}",entry);
enterdInteger =Convert.ToInt32(entry);
more = enteredInteger + 1;
less = enteredInteger - 1;
WriteLine("One more than (0) is {1}and one less than {2} is {3}",
enteredInteger, more less);
}
}

Debugging Exercise 2-4 Instructions Y The program DebugTwo4.cs has syntax and/or logical errors. Determine the problem(s) and fix the program. Grading 7 DebugTwo4.cs + 1 // This program tells the user the values of the integers that are 2 // one more and one less than the entered integer 3 using System; 4 using static System.Console; 5 classDebugTwo4 6 { static void Main() 8 When you have completed your program, click the Submit button to record your score. { 9 string entry; 10 int entered Integer; 11 int more, less; 12 13 14 15 16 more 17 less 18 19 Write("Enter an integer >> "); entry ReadLine(); WriteLine("You entered {0}", entry); enterdInteger = Convert.ToInt32(entry); enteredInteger + 1; enteredInteger 1; WriteLine("One more than (0) is {1} and one less than {2} is {3}", enteredInteger, more less); 20 } 21 } 22

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

Which technology helps create an intelligent classroom environment?

Answered: 1 week ago