Digital FXtbook
Easy Contacts
  • Home
    • Free Software
    • The Author
    • Former Students Hall of Fame
    • A tribute....
  • Animation
    • Intro to 3d >
      • AutoDesk
      • Introduction: The Temple
      • Creating a Film >
        • Scriptwriting and Planning
        • StoryBoarding
        • Story Reels
      • Modeling >
        • The Nail
        • First Freestyle Lesson >
          • Cup and Straw
          • Garbage Can
        • Fence
        • Hammer
        • House
        • Environment Bubble
      • Animation >
        • Beginning Animation
        • Animation - Walk Cycle
        • Facial Animation
      • Rendering >
        • Arnold Rendering
      • Editing film >
        • Credits
        • Video Editing
      • Characters
    • Modeling and Rigging >
      • Modeling >
        • Image Planes
        • Polygon Modeling >
          • Coke Can
          • Low Polygon Character
          • Character Modeling Legion the Geth
          • Character Modeling Geth Armor
          • Face Modeling
        • NURBS Modeling >
          • Intro to NURBS
          • Lofting
          • CV Curves
          • Organic Modeling
          • Autombile
      • 3d Coat >
        • Integration with Maya >
          • Getting stuff out of Maya
        • UV Texture Mapping >
          • Texture mapping in 3d Coat
        • 3d Painting >
          • Painting in 3d Coat
        • Reintegration with Maya
      • Rigging >
        • Rigging with HumanIK
        • Smooth Skinning
      • Motion Capture
    • 3d Animation >
      • Arnold Rendering
      • Reference Videos
      • Beginning Animation
      • Characters
  • Gaming
    • Board Game Game Design Document
    • Modeling >
      • Introduction: The Temple
      • Halo 1 Blood Gulch Base
      • Hammer
      • Sword
      • Character Modeling Big Daddy
      • Shield
      • The OM6G
      • Weapon
      • Character Modeling Legion the Geth
      • Character Modeling Geth Armor
    • Animation >
      • Character Animation
    • Rigging >
      • Rigging with HumanIK
      • Characterizing and MoCap
      • Integration with Unity
    • Unity >
      • Block Breaker >
        • Block Breaker Game #1
        • Block Breaker Game #2
        • Block Breaker Game #3
        • Block Breaker Game #4
      • Terrain
      • Importing Models
  • Coding
    • Beginning C# >
      • First Unit >
        • First Program
        • Comments
        • PsuedoCode
        • Numbers and Operators
        • Use of Parenthesis
        • Casting
        • Try and Catch
        • Operators
      • Second Unit >
        • Conditional Statements >
          • Number validator
          • Number tester
          • Speed Camera
        • Random Class
        • Loops >
          • For Loops
          • For Each Loops
          • While Loops
          • Do While Loops
        • Arrays >
          • Simple Arrays
          • Complex Arrays
      • Third Unit
    • Intermediate C# >
      • Object Oriented Programming
  • Student Films
    • Advanced Student's movies
    • Beginning Student's movies
  • Adobe
    • Photoshop >
      • Introduction
      • Selection Tools >
        • Melonhead >
          • Melonhead Creative
        • Breakfast Lunch or Dinner
        • Blu 42
      • Painting Tools >
        • Invisi-World
        • Image Adjustment
        • FreeStyle project
      • Drawing Tools >
        • Abstract Expressionism
    • Premier >
      • Project 1
    • Illustrator >
      • Vector Ninjas
      • Live Art Painting
      • Starting the Pen Tool
      • Apple and Pear
      • Creating Your LOGO
      • Self Portrait
  • Links
    • Distance Reconnecting
    • Key Board Fix/Hack
    • Buiding Piers >
      • Buiding Piers
      • Buiding Piers
    • The Top Six Animation Schools
    • The Top Video Game Design Schools
  • International Team
  • BPA
    • BPA 2017-2018 >
      • Getting organized
      • Building the Train
      • Texturing the Train
      • Animating the Train
      • Making our Entry Film
    • BPA 2018-2019
    • BPA 2019-2020
  • Arnold Lighting
  • Faculty Video
  • Velomobile
  • CTE Summer Workshop

The Tax lesson

Picture
To try and accomplish this lesson i had to learn a little bit about how to figure up the mathematical end of it all. The code isn't really all that difficult once the formula is figured out.

This lesson is all about using If Else statements in such a way as figuring out how much and item costs before tax and how much tax has then been placed upon that item.

For Example; I have to pay $123 for an item at the cash register, and I know that the tax in my area is 23%. That would make the item original price tag $100 and the tax on the item $23 finishing out with a final price of $123.00. 

That example is really simple. because it is based off of perfect numbers... But what about the following scenario?

The final price being $123 and the tax rate being 50%........
These numbers changed EVERYTHING!!! I struggled with this and struggled with this until I finally found this Web page...

Click on the picture above to go to the web page  

On this web page I found a formula that I never knew before. It is actually really simple and straight forward.

Here is how it breaks down.

Take the percent... In the example it is 50% and divide it by 100... giving us .50, then add 1 to it. This will give us the number 1.5 

We then take the Gross price of $123 and divide it by 1.5, that we got from the previous step. This gives us $82, which is the original price of the item that we call the Net price. If we take $82 and subtract it from $123 that would give us $41 which is half of $82 and so that confirms everything.

In my video below I will basically do this same procedure as I just described above, for those that don't get it from the text.  




​The Assignment 

Wherever you are and whatever you pay for, you usually spend your money on two things:
the first is for a good or service you are buying, and the second is taxes.

This means that the amount of money you are transferring (named "gross price") to the seller is a sum of the actual price (named "net price") and the tax.
The tax is calculated as a percentage of the net price and its rate depends on a lot of unpredictable factors (e.g. where you live, what you buy, etc., etc., etc.).
Your task is to write a simple "tax calculator" – it should accept two values:a gross price and a tax rate expressed as a percentage (i.e. a value greater than 0 and, let's be optimistic, less than 100).

Look at the code below – it only reads two input values and outputs the results, so you need to complete it with a few smart calculations. It would be good to verify if the values entered are reasonable (e.g. gross price is greater than zero and tax rate falls into the previously mentioned range).

​Test your code using the data we've provided. 

Sample Code

#include
using namespace std;

int main(void)
{

     float grossprice, taxrate, netprice, taxvalue;
     cout << "Enter a gross price: ";
     cin >> grossprice;
     cout << "Enter a tax rate: ";
     cin >> taxrate;
     // Insert you code here

     cout << "Net price: " << netprice << endl;
     cout << "Tax value: " << taxvalue << endl;
     return 0;
​}




​Helping video

Proudly powered by Weebly