///// This part is where the first three textboxes add to make the forth /////// const int ticketPriceA = 150; const int ticketPriceB = 125; const int ticketPriceC = 95; int TicketA = 0; int TicketB = 0; int TicketC = 0; decimal totalCost; TicketA = int.Parse(txtTicketA.Text); TicketB = int.Parse(txtTicketB.Text); TicketC = int.Parse(txtTicketC.Text); decimal totalCostA = ticketPriceA * TicketA; decimal totalCostB = ticketPriceB * TicketB; decimal totalCostC = ticketPriceC * TicketC; totalCost = (totalCostA + totalCostB + totalCostC); lblTOTALCOST.Text = string.Format("{0:c}", totalCost); ///////// This is where I am trying to save the variables from above into two sets of three textboxes below /////// const int ticketPriceA = 150; const int ticketPriceB = 125; const int ticketPriceC = 95; decimal VALUEA; decimal VALUEB; decimal VALUEC; int TicketA = 0; int TicketB = 0; int TicketC = 0; decimal SOLDA; //////// I don't know if I am defining these right ///////// decimal SOLDB; decimal SOLDC; decimal SOLDA = (TicketA); ////// My biggest problem is what the math formulas should be ////// decimal SOLDB = (TicketB); ////// or how to send the numbers from above to the bottom ////// decimal SOLDC = (TicketC); ////// I know the errors here are because it is the same formula ////// decimal VALUEA = (ticketPriceA * TicketA); decimal VALUEB = (ticketPriceB * TicketB); decimal VALUEC = (ticketPriceC * TicketB); lblSOLDA.Text = string.Format("{0:c}", TicketA); lblSOLDB.Text = string.Format("{0:c}", TicketB); lblSOLDC.Text = string.Format("{0:c}", TicketC); lblVALUEA.Text = string.Format("{0:c}", VALUEA); lblVALUEB.Text = string.Format("{0:c}", VALUEB); lblVALUEC.Text = string.Format("{0:c}", VALUEC);

MOD EDIT: USE CODE TAGS!!!!

This post has been edited by **JackOfAllTrades**: 05 October 2010 - 04:54 AM