![]() |
| | #1 |
| Registered User Join Date: May 2002
Posts: 96
| Adding up all the numbers in the list... Here's an example of how it works. 20 + 5 * 2 / 5 + 100 * 4 ... (and so on until the user selects equal and then press add, then the calculator will do the process as mentioned (for example: 20 + 5 * 2 / 5 + 100 * 4 =). Here's the code that I'm trying to do: Code: private void Add_Click(object sender, System.EventArgs e)
{
numbers = Decimal.Parse(MainDisplay.Text);
TrackingDisplay.Items.Add(numbers.ToString());
if(P.Checked == true)
{
SymbolList.Items.Add(plus.ToString());
}
if(S.Checked == true)
{
SymbolList.Items.Add(minus.ToString());
}
if(M.Checked == true)
{
SymbolList.Items.Add(multiply.ToString());
}
if(D.Checked == true)
{
SymbolList.Items.Add(divide.ToString());
}
if(D100.Checked == true)
{
SymbolList.Items.Add(percent.ToString());
}
if(E.Checked == true)
{
SymbolList.Items.Add(equals.ToString());
decimal[] totalfromtracking = TrackingDisplay.Items.CopyTo(0,0);
for(int i = 0; i <= totalfromtracking; i++) {
}
}
Code: if(E.Checked == true) For example: 8 5 10 23 7 9 ...and so on... Thanks for your time reading my post! -Grayson
__________________ View in Braille. http://www.future-gpnet.com/braille.jpg Like a bolt out of the BLUE, Fate steps up and sees you THROUGH, When you wish upon a STAR YOUR DREAMS COME TRUE. |
| Grayson_Peddie is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unknown memory leak with linked lists... | RaDeuX | C Programming | 6 | 12-07-2008 04:09 AM |
| Pleas take a look & give a critique | sh3rpa | C++ Programming | 14 | 10-19-2007 10:01 PM |
| link list | Unregistered | C++ Programming | 4 | 12-13-2001 05:41 AM |
| 1st Class LIST ADT | Unregistered | C++ Programming | 1 | 11-09-2001 07:29 PM |
| singly linked list | clarinetster | C Programming | 2 | 08-26-2001 10:21 PM |