error in program for population

I am working on a program and I almost have it working the way I want except for two problems. The first is major; I can not for the life of me get my answer for the population to equal anything but zero. I have a feeling this is due to my combo box selection but Im not positive and Im not sure how to fix it. My second problem is with my combo boxes I can select a number and have something pop up in the list box but if I type in and enter my own number into the combo box nothing appears in my list box.

First of all, you should have posted this in the thread you already statrted for this problem. Other than that:

GrowthRate = 1 * (DailyPercent / 100)

should be

GrowthRate = 1 + (DailyPercent / 100)

But even that won't work because you have the wrong type for DailyPercent. It should be an integer or a double depending on whether or not you allow fractions of a percent. Making it bool essentially means it has the value True or False.

One last suggestion. It is good form to limit the scope of variables. Because Day is used only in the loop it is better not to declare it outside the loop. A better form would be

Pythagoras would have wanted this, but alas growth rates don't very often express themselves as Integer. So why are you defining yor variables as integers instead of doubles? Converting to boolean on line 8, as RJ points out boils down to true and false. false = 0 and true is 1. So GrowthRate would be zero I guess. These kind of "tricks" is one of the reasons why VB is not my favorite language anymore.

That's why they have Option Strict On. If you set this as a default option (as is advised for beginners) your second example gets flagged as an error and will not compile. I suppose I should have included that in my unsolicited advice from the previous thread. I've never used that option because I am very careful in my implicit casting. I find it obfuscates the code in cases like

I don't like Java very much either. But C# is different, your code would simply become Button btn = sender as Button; No options or so required. But don't let that trick you, C# can be quite daunting. If you ever find the time and the need, you could perhaps read "C# programming" by Jonas Fagerberg.

Lots of books, but like I said, just a lack of motivation. I start on a project in C# and stumble around, then decide I'd rather just blast it out quickly in VB. Usually when I start to write a program it's because I need it now.

Usually when I start to write a program it's because I need it now.
Haha, we're opposites I guess, what you do in VB, I do in C# with .NET in common.
It would be a dull world if we all think the same. :)

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...