ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
You have not called the other functions in your code FROM main.
The only method you're calling is DisplayIntructions();
Also, how is the program supposed to detect the user has stopped entering values?
Something like this might help:
using System;
using System.Collections.Generic;
using System.Linq;
namespace DW_412384_CS_CON
{
class Program
{
static void Main(string[] args)
{
string strInput = "";
Console.WriteLine("Enter a number from 1 to 10. -1 to quit");
while (!strInput.Equals("-1"))
{
Console.Write(": ");
if ("-1" == (strInput = Console.ReadLine()))
continue;
}
}
}
}
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Inside the while loop with strInput, you need to put the result of what the user enters into your list (or array) if it fits the criteria.
If it does not, ignore it.
If it is a -1, you can exit and print the graph.
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Also, if you pre-fill the tally array (or list) with the digits from 1-10, you can use one-off math to do the count and not have to keep track of which numbers were not used.
So, if the user enters the same number multiple times and does not enter other numbers, you probably still have to show the other numbers with zero asterisks, right?
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402