I took a test last night and I had a program due at the end. I could not figure out. I would like to understand what I did wrong and what I need to remember for future reference. Here is what I had and the instructions.
Using the Visual Studio .NET IDE, write the following program as described. When completed, submit the program using the midterm program assignment on Blackboard.
The user should be prompted for the range of numbers to display.
The user should be prompted to determine if even or odd numbers should be displayed.
The program should display the range of numbers in both decimal and hexadecimal form (inclusive/non-inclusive, it is up to you).
There should be a header line with Decimal and Hex displayed as in the above screenshot.
After the numbers have been displayed, the user should be prompted, asking if they want to run the program again.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace midterm_365
{
class Program
{
static void Main(string[] args)
{
//show the questions where to start end and if they want even of odd numbers
Console.Write("Where do you want to start counting <integer> 0>:");
Console.ReadLine();
Console.Write("Where do you want to end counting <integer> 0>:");
Console.ReadLine();
Console.Write("Display even or odd numbers <e, o>:");
Console.ReadLine();
string hex = string.Empty;
//gives the location of decimal and hex
Console.WriteLine("{0} {1,20}", "Decimal", "Hex");
//ask the customer do they want to run the program again
Console.Write("Run again <yes/no>:");
Console.ReadLine();
}
}
}