Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
how to ue percents(for a cash register)
Author Message
the_scott_mans

Posted: Mon Mar 31, 2003 2:49 pm   Post subject: how to ue percents(for a cash register)

I was just wondering on how to calculate the pecent of somthing for cash register (TAXES)

EX. \$28.00 + 15%
Sponsor
Sponsor

Tony

Posted: Mon Mar 31, 2003 3:16 pm   Post subject: (No subject)

you multiply by persantage/100.

if you add persantage then first you find what the persantage is (though multiplying) then you add.

so canadian tax is:
 code: total := subtotal + subtotal*15/100

or you can just use 0.15 which is same as 15/100
Tony's programming blog. DWITE - a programming contest.
the_scott_mans

Posted: Mon Mar 31, 2003 3:39 pm   Post subject: (No subject)

thanks i think this is a great site
the_scott_mans

Posted: Mon Mar 31, 2003 3:45 pm   Post subject: (No subject)

do you know how to get it to only add up the choices selected
Asok

Posted: Mon Mar 31, 2003 5:38 pm   Post subject: (No subject)

use a boolean(true/false variable) per specific item to determine what has been selected and what hasn't.
the_scott_mans

Posted: Mon Mar 31, 2003 6:46 pm   Post subject: (No subject)

How would i go about doing this? like would i put "get (var)" and have them enter in the numbers and when the number was entered it would be like a true statement.

Do you know a little of the code just an example so i can see how it is done just wondering i think i know what you mean.
Blade

Posted: Mon Mar 31, 2003 7:29 pm   Post subject: (No subject)

 code: var choice:boolean:=false %declare the var as false... make it true later on in your %program, if something happens that makes it true %your code here if choice = false then %do whatever else %do whatever if its true end if
the_scott_mans

Posted: Mon Mar 31, 2003 9:11 pm   Post subject: (No subject)

after i have done all that what would i put for the true statement how would i add up the prices

sorry i am new to this and thanks to all u who hae been helping me
Sponsor
Sponsor

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 8 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: