Solve simple c# assignment -- 2
Budget: $250 – $750 USD
Hello, I need someone to solve this simple assignment. The order in the code is wrong, the loop don't work. Where its "?" you need to add the correct variable. First one to solve to provide me a solution gets 50$.
Instructions -
1.Users choose how many numbers they want to save
2.The user is allowed to enter as many numbers as they have chosen
3.We add up all the entered numbers
4.We present the sum.
Code -
List<int> numberList = new List<int>();
int wholeNumber = 0;
Console.WriteLine("How many numbers do you want to enter?");
Int32.TryParse(Console.ReadLine(), out int total);
Console.WriteLine("Write an number");
Int32.TryParse(Console.ReadLine(), out int result);
numberList.Add(result);
for (int i = 0; i < ?; i++)
{
}
foreach (int number in ?)
{
wholeNumber += number;
}
Console.WriteLine("The total will be:" + wholeNumber);
Console.ReadLine();
Instructions -
1.Users choose how many numbers they want to save
2.The user is allowed to enter as many numbers as they have chosen
3.We add up all the entered numbers
4.We present the sum.
Code -
List<int> numberList = new List<int>();
int wholeNumber = 0;
Console.WriteLine("How many numbers do you want to enter?");
Int32.TryParse(Console.ReadLine(), out int total);
Console.WriteLine("Write an number");
Int32.TryParse(Console.ReadLine(), out int result);
numberList.Add(result);
for (int i = 0; i < ?; i++)
{
}
foreach (int number in ?)
{
wholeNumber += number;
}
Console.WriteLine("The total will be:" + wholeNumber);
Console.ReadLine();