Q:

C# missing value when using count++

Student here.   Why is this piece of code not adding all the values?   It keeps missing one of the values when trying to get the sum.  
I test it using 5+5+5.335 and get an answer of 2 items and 10.34.   Should be 3 items and 15.34.  
decimal inputNum = 0m, totalInput = 0m;
int count = 0;
string validNum = "";

    while (validNum == "")
    {
    Console. WriteLine("Enter the number of each item on a separate line.   Enter "0" when done. "); 
    validNum = Console. ReadLine();
        do
        {
        Console. Write("");
        validNum = Console. ReadLine();

            if (decimal. TryParse(validNum, out inputNum) && inputNum > 0)
            {
            totalInput += inputNum;
            totalInput = Math. Round(totalInput, 2);
            count++;
            }
            else
            {
                 if (validNum == "0")
                 {
                      break;
                 }
                 Console. WriteLine("*** Invalid input.   Try again. ***"); 
             }
    } while (validNum ! = "");
}
Console. WriteLine($"There are {count} items totaling ${totalInput}");

Console. ReadKey();``

A:

You're calling Console. ReadLine() twice on the first iteration.  Because of this, no matter what you enter as the first number, it will always be dropped. 
Simply remove the Console. ReadLine() above the do...while loop.