snipt

Ctrl+h for KB shortcuts

C

Weekly Salary with Tax

/* Write a C program that accepts an employees tax threshold, 
 * total worked hours for a week and the amount he received per hour. 
 * Print the employee's salary in a week (with two decimal places) 
 * after tax and including 8% holiday pay */

#include <stdio.h> 

int main(void) {

  int hour;
  double amountPerHour, tax, holidayPayTax = 8;

  printf("What is your tax threshold in %%: ");
  scanf("%lf", &tax);

  printf("Hours worked this week: ");
  scanf("%d", &hour);

  printf("Pay per hour: $");
  scanf("%lf", &amountPerHour);

  /* Calculation for the Percent Portion: 
   * endTotal = tax * total */
  double total = hour * amountPerHour;
  double percentDeduction = tax * total;
  double percentConvert = tax / 100;
  double totalTax = percentConvert * total;
  double endTotal = total - totalTax; 
  
  printf("Total before Holiday Pay: $%.2lf\n", endTotal);

  /* calculation of 8% holiday pay */
  double holidayPay = holidayPayTax * total;
  double holidayPayConvert = holidayPayTax / 100;
  double totalHolidayPayTax = holidayPayConvert * total;

  /* 17.5% tax ontop of Holiday Pay */
  double holidayPayAfterTax = tax * totalHolidayPayTax;
  double holidayConvert = tax / 100;
  double totalHolidayTax = holidayConvert * totalHolidayPayTax;
  double holidayPayFinal = totalHolidayPayTax - totalHolidayTax;

  printf("Your 8%% holiday pay after tax is: $%.2lf\n",  holidayPayFinal);

  double takeHomePay = endTotal + holidayPayFinal;
  printf("Total pay for the week: $%.2lf\n", takeHomePay);

    return 0;
}

//BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION
https://snipt.net/embed/a9c89d100b1e7d7c5de7585bbbad5690/
/raw/a9c89d100b1e7d7c5de7585bbbad5690/
a9c89d100b1e7d7c5de7585bbbad5690
c
C
51
2019-08-19T10:49:23
True
False
False
Aug 18, 2019 at 06:26 AM
/api/public/snipt/343067/
weekly-salary-with-tax-unfinished
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1"> 1</a> <a href="#L-2"> 2</a> <a href="#L-3"> 3</a> <a href="#L-4"> 4</a> <a href="#L-5"> 5</a> <a href="#L-6"> 6</a> <a href="#L-7"> 7</a> <a href="#L-8"> 8</a> <a href="#L-9"> 9</a> <a href="#L-10">10</a> <a href="#L-11">11</a> <a href="#L-12">12</a> <a href="#L-13">13</a> <a href="#L-14">14</a> <a href="#L-15">15</a> <a href="#L-16">16</a> <a href="#L-17">17</a> <a href="#L-18">18</a> <a href="#L-19">19</a> <a href="#L-20">20</a> <a href="#L-21">21</a> <a href="#L-22">22</a> <a href="#L-23">23</a> <a href="#L-24">24</a> <a href="#L-25">25</a> <a href="#L-26">26</a> <a href="#L-27">27</a> <a href="#L-28">28</a> <a href="#L-29">29</a> <a href="#L-30">30</a> <a href="#L-31">31</a> <a href="#L-32">32</a> <a href="#L-33">33</a> <a href="#L-34">34</a> <a href="#L-35">35</a> <a href="#L-36">36</a> <a href="#L-37">37</a> <a href="#L-38">38</a> <a href="#L-39">39</a> <a href="#L-40">40</a> <a href="#L-41">41</a> <a href="#L-42">42</a> <a href="#L-43">43</a> <a href="#L-44">44</a> <a href="#L-45">45</a> <a href="#L-46">46</a> <a href="#L-47">47</a> <a href="#L-48">48</a> <a href="#L-49">49</a> <a href="#L-50">50</a> <a href="#L-51">51</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cm">/* Write a C program that accepts an employees tax threshold, </span> </span><span id="L-2"><a name="L-2"></a><span class="cm"> * total worked hours for a week and the amount he received per hour. </span> </span><span id="L-3"><a name="L-3"></a><span class="cm"> * Print the employee&#39;s salary in a week (with two decimal places) </span> </span><span id="L-4"><a name="L-4"></a><span class="cm"> * after tax and including 8% holiday pay */</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt; </span><span class="cp"></span> </span><span id="L-7"><a name="L-7"></a> </span><span id="L-8"><a name="L-8"></a><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-9"><a name="L-9"></a> </span><span id="L-10"><a name="L-10"></a> <span class="kt">int</span> <span class="n">hour</span><span class="p">;</span> </span><span id="L-11"><a name="L-11"></a> <span class="kt">double</span> <span class="n">amountPerHour</span><span class="p">,</span> <span class="n">tax</span><span class="p">,</span> <span class="n">holidayPayTax</span> <span class="o">=</span> <span class="mi">8</span><span class="p">;</span> </span><span id="L-12"><a name="L-12"></a> </span><span id="L-13"><a name="L-13"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;What is your tax threshold in %%: &quot;</span><span class="p">);</span> </span><span id="L-14"><a name="L-14"></a> <span class="n">scanf</span><span class="p">(</span><span class="s">&quot;%lf&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">tax</span><span class="p">);</span> </span><span id="L-15"><a name="L-15"></a> </span><span id="L-16"><a name="L-16"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Hours worked this week: &quot;</span><span class="p">);</span> </span><span id="L-17"><a name="L-17"></a> <span class="n">scanf</span><span class="p">(</span><span class="s">&quot;%d&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">hour</span><span class="p">);</span> </span><span id="L-18"><a name="L-18"></a> </span><span id="L-19"><a name="L-19"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Pay per hour: $&quot;</span><span class="p">);</span> </span><span id="L-20"><a name="L-20"></a> <span class="n">scanf</span><span class="p">(</span><span class="s">&quot;%lf&quot;</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">amountPerHour</span><span class="p">);</span> </span><span id="L-21"><a name="L-21"></a> </span><span id="L-22"><a name="L-22"></a> <span class="cm">/* Calculation for the Percent Portion: </span> </span><span id="L-23"><a name="L-23"></a><span class="cm"> * endTotal = tax * total */</span> </span><span id="L-24"><a name="L-24"></a> <span class="kt">double</span> <span class="n">total</span> <span class="o">=</span> <span class="n">hour</span> <span class="o">*</span> <span class="n">amountPerHour</span><span class="p">;</span> </span><span id="L-25"><a name="L-25"></a> <span class="kt">double</span> <span class="n">percentDeduction</span> <span class="o">=</span> <span class="n">tax</span> <span class="o">*</span> <span class="n">total</span><span class="p">;</span> </span><span id="L-26"><a name="L-26"></a> <span class="kt">double</span> <span class="n">percentConvert</span> <span class="o">=</span> <span class="n">tax</span> <span class="o">/</span> <span class="mi">100</span><span class="p">;</span> </span><span id="L-27"><a name="L-27"></a> <span class="kt">double</span> <span class="n">totalTax</span> <span class="o">=</span> <span class="n">percentConvert</span> <span class="o">*</span> <span class="n">total</span><span class="p">;</span> </span><span id="L-28"><a name="L-28"></a> <span class="kt">double</span> <span class="n">endTotal</span> <span class="o">=</span> <span class="n">total</span> <span class="o">-</span> <span class="n">totalTax</span><span class="p">;</span> </span><span id="L-29"><a name="L-29"></a> </span><span id="L-30"><a name="L-30"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Total before Holiday Pay: $%.2lf</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">endTotal</span><span class="p">);</span> </span><span id="L-31"><a name="L-31"></a> </span><span id="L-32"><a name="L-32"></a> <span class="cm">/* calculation of 8% holiday pay */</span> </span><span id="L-33"><a name="L-33"></a> <span class="kt">double</span> <span class="n">holidayPay</span> <span class="o">=</span> <span class="n">holidayPayTax</span> <span class="o">*</span> <span class="n">total</span><span class="p">;</span> </span><span id="L-34"><a name="L-34"></a> <span class="kt">double</span> <span class="n">holidayPayConvert</span> <span class="o">=</span> <span class="n">holidayPayTax</span> <span class="o">/</span> <span class="mi">100</span><span class="p">;</span> </span><span id="L-35"><a name="L-35"></a> <span class="kt">double</span> <span class="n">totalHolidayPayTax</span> <span class="o">=</span> <span class="n">holidayPayConvert</span> <span class="o">*</span> <span class="n">total</span><span class="p">;</span> </span><span id="L-36"><a name="L-36"></a> </span><span id="L-37"><a name="L-37"></a> <span class="cm">/* 17.5% tax ontop of Holiday Pay */</span> </span><span id="L-38"><a name="L-38"></a> <span class="kt">double</span> <span class="n">holidayPayAfterTax</span> <span class="o">=</span> <span class="n">tax</span> <span class="o">*</span> <span class="n">totalHolidayPayTax</span><span class="p">;</span> </span><span id="L-39"><a name="L-39"></a> <span class="kt">double</span> <span class="n">holidayConvert</span> <span class="o">=</span> <span class="n">tax</span> <span class="o">/</span> <span class="mi">100</span><span class="p">;</span> </span><span id="L-40"><a name="L-40"></a> <span class="kt">double</span> <span class="n">totalHolidayTax</span> <span class="o">=</span> <span class="n">holidayConvert</span> <span class="o">*</span> <span class="n">totalHolidayPayTax</span><span class="p">;</span> </span><span id="L-41"><a name="L-41"></a> <span class="kt">double</span> <span class="n">holidayPayFinal</span> <span class="o">=</span> <span class="n">totalHolidayPayTax</span> <span class="o">-</span> <span class="n">totalHolidayTax</span><span class="p">;</span> </span><span id="L-42"><a name="L-42"></a> </span><span id="L-43"><a name="L-43"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Your 8%% holiday pay after tax is: $%.2lf</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">holidayPayFinal</span><span class="p">);</span> </span><span id="L-44"><a name="L-44"></a> </span><span id="L-45"><a name="L-45"></a> <span class="kt">double</span> <span class="n">takeHomePay</span> <span class="o">=</span> <span class="n">endTotal</span> <span class="o">+</span> <span class="n">holidayPayFinal</span><span class="p">;</span> </span><span id="L-46"><a name="L-46"></a> <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Total pay for the week: $%.2lf</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span> <span class="n">takeHomePay</span><span class="p">);</span> </span><span id="L-47"><a name="L-47"></a> </span><span id="L-48"><a name="L-48"></a> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> </span><span id="L-49"><a name="L-49"></a><span class="p">}</span> </span><span id="L-50"><a name="L-50"></a> </span><span id="L-51"><a name="L-51"></a><span class="c1">//BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION</span> </span></pre></div> </td></tr></table>
--- 
+++ 
@@ -19,12 +19,13 @@
   printf("Pay per hour: $");
   scanf("%lf", &amountPerHour);
 
-  /* calculation for the percent portion: y(endTotal) = p(tax) * x(total) */
-  double total /*x*/ = hour * amountPerHour;
+  /* Calculation for the Percent Portion: 
+   * endTotal = tax * total */
+  double total = hour * amountPerHour;
   double percentDeduction = tax * total;
   double percentConvert = tax / 100;
   double totalTax = percentConvert * total;
-  double endTotal /*y*/ = total - totalTax; 
+  double endTotal = total - totalTax; 
   
   printf("Total before Holiday Pay: $%.2lf\n", endTotal);
 
@@ -33,12 +34,10 @@
   double holidayPayConvert = holidayPayTax / 100;
   double totalHolidayPayTax = holidayPayConvert * total;
 
-
   /* 17.5% tax ontop of Holiday Pay */
   double holidayPayAfterTax = tax * totalHolidayPayTax;
   double holidayConvert = tax / 100;
   double totalHolidayTax = holidayConvert * totalHolidayPayTax;
-
   double holidayPayFinal = totalHolidayPayTax - totalHolidayTax;
 
   printf("Your 8%% holiday pay after tax is: $%.2lf\n",  holidayPayFinal);
--- 
+++ 
@@ -1,5 +1,7 @@
-/* Write a C program that accepts an employees tax threshold, total worked hours for a week and the amount he received per hour. 
-Print the employee's salary in a week (with two decimal places) after tax and including 8% holiday pay */
+/* Write a C program that accepts an employees tax threshold, 
+ * total worked hours for a week and the amount he received per hour. 
+ * Print the employee's salary in a week (with two decimal places) 
+ * after tax and including 8% holiday pay */
 
 #include <stdio.h> 
 
@@ -17,8 +19,7 @@
   printf("Pay per hour: $");
   scanf("%lf", &amountPerHour);
 
-  /*calculation for the percent portion:
-  y(endTotal) = p(tax) * x(total)*/
+  /* calculation for the percent portion: y(endTotal) = p(tax) * x(total) */
   double total /*x*/ = hour * amountPerHour;
   double percentDeduction = tax * total;
   double percentConvert = tax / 100;
@@ -27,13 +28,13 @@
   
   printf("Total before Holiday Pay: $%.2lf\n", endTotal);
 
-  /*calculation of 8% holiday pay*/
+  /* calculation of 8% holiday pay */
   double holidayPay = holidayPayTax * total;
   double holidayPayConvert = holidayPayTax / 100;
   double totalHolidayPayTax = holidayPayConvert * total;
 
 
-  /*17.5% tax ontop of Holiday Pay*/
+  /* 17.5% tax ontop of Holiday Pay */
   double holidayPayAfterTax = tax * totalHolidayPayTax;
   double holidayConvert = tax / 100;
   double totalHolidayTax = holidayConvert * totalHolidayPayTax;
@@ -48,5 +49,4 @@
     return 0;
 }
 
-
 //BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION
--- 
+++ 
@@ -6,9 +6,7 @@
 int main(void) {
 
   int hour;
-  double amountPerHour;
-  double tax;
-  const double holidayPayTax = 8;
+  double amountPerHour, tax, holidayPayTax = 8;
 
   printf("What is your tax threshold in %%: ");
   scanf("%lf", &tax);
--- 
+++ 
@@ -45,7 +45,7 @@
   printf("Your 8%% holiday pay after tax is: $%.2lf\n",  holidayPayFinal);
 
   double takeHomePay = endTotal + holidayPayFinal;
-  printf("Total pay for the week: $%.2lf", takeHomePay);
+  printf("Total pay for the week: $%.2lf\n", takeHomePay);
 
     return 0;
 }
--- 
+++ 
@@ -27,7 +27,7 @@
   double totalTax = percentConvert * total;
   double endTotal /*y*/ = total - totalTax; 
   
-  printf("Total before Holiday Pay: $%lf\n", endTotal);
+  printf("Total before Holiday Pay: $%.2lf\n", endTotal);
 
   /*calculation of 8% holiday pay*/
   double holidayPay = holidayPayTax * total;
@@ -42,12 +42,13 @@
 
   double holidayPayFinal = totalHolidayPayTax - totalHolidayTax;
 
-  printf("Your 8%% holiday pay after tax is: $%lf\n",  holidayPayFinal);
+  printf("Your 8%% holiday pay after tax is: $%.2lf\n",  holidayPayFinal);
 
   double takeHomePay = endTotal + holidayPayFinal;
-  printf("Total pay for the week: $%lf", takeHomePay);
+  printf("Total pay for the week: $%.2lf", takeHomePay);
 
     return 0;
 }
 
+
 //BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION
1
2
3
4
5
6
7
8
9
--- 
+++ 
@@ -1,4 +1,5 @@
-/* Write a C program that accepts an employees total worked hours for a week and the amount he received per hour. Print the employee's salary in a week (with two decimal places) AFTER 12% TAX. NOT FINISHED */
+/* Write a C program that accepts an employees tax threshold, total worked hours for a week and the amount he received per hour. 
+Print the employee's salary in a week (with two decimal places) after tax and including 8% holiday pay */
 
 #include <stdio.h> 
 
--- 
+++ 
@@ -6,8 +6,11 @@
 
   int hour;
   double amountPerHour;
-  const double tax /*p*/ = 17.5;
+  double tax;
   const double holidayPayTax = 8;
+
+  printf("What is your tax threshold in %%: ");
+  scanf("%lf", &tax);
 
   printf("Hours worked this week: ");
   scanf("%d", &hour);
--- 
+++ 
@@ -9,10 +9,10 @@
   const double tax /*p*/ = 17.5;
   const double holidayPayTax = 8;
 
-  printf("Input the employees total hours worked within a week: ");
+  printf("Hours worked this week: ");
   scanf("%d", &hour);
 
-  printf("Input the employees pay per hour: $");
+  printf("Pay per hour: $");
   scanf("%lf", &amountPerHour);
 
   /*calculation for the percent portion:
@@ -23,23 +23,27 @@
   double totalTax = percentConvert * total;
   double endTotal /*y*/ = total - totalTax; 
   
-  printf("The total take home pay before holiday pay is: $%lf\n", endTotal);
+  printf("Total before Holiday Pay: $%lf\n", endTotal);
 
   /*calculation of 8% holiday pay*/
   double holidayPay = holidayPayTax * total;
   double holidayPayConvert = holidayPayTax / 100;
   double totalHolidayPayTax = holidayPayConvert * total;
 
-  printf("Your holiday pay before tax is $%lf\n", totalHolidayPayTax);
 
   /*17.5% tax ontop of Holiday Pay*/
-  double holidayPayAfterTax = tax * holidayPayAfterTax;
-  
+  double holidayPayAfterTax = tax * totalHolidayPayTax;
+  double holidayConvert = tax / 100;
+  double totalHolidayTax = holidayConvert * totalHolidayPayTax;
 
+  double holidayPayFinal = totalHolidayPayTax - totalHolidayTax;
+
+  printf("Your 8%% holiday pay after tax is: $%lf\n",  holidayPayFinal);
+
+  double takeHomePay = endTotal + holidayPayFinal;
+  printf("Total pay for the week: $%lf", takeHomePay);
 
     return 0;
 }
 
-
-
 //BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION
--- 
+++ 
@@ -38,4 +38,8 @@
 
 
     return 0;
-}+}
+
+
+
+//BUILD ON THIS BY CREATING YOUR OWN FUNCTION TO WORKOUT DIFFERENT TAX AMOUNT BASED ON ARGUMENT IN FUNCTION
--- 
+++ 
@@ -1,11 +1,13 @@
 /* Write a C program that accepts an employees total worked hours for a week and the amount he received per hour. Print the employee's salary in a week (with two decimal places) AFTER 12% TAX. NOT FINISHED */
 
 #include <stdio.h> 
+
 int main(void) {
 
   int hour;
   double amountPerHour;
   const double tax /*p*/ = 17.5;
+  const double holidayPayTax = 8;
 
   printf("Input the employees total hours worked within a week: ");
   scanf("%d", &hour);
@@ -14,14 +16,26 @@
   scanf("%lf", &amountPerHour);
 
   /*calculation for the percent portion:
-  y(total) = p(tax) * x(total)*/
+  y(endTotal) = p(tax) * x(total)*/
   double total /*x*/ = hour * amountPerHour;
   double percentDeduction = tax * total;
   double percentConvert = tax / 100;
   double totalTax = percentConvert * total;
   double endTotal /*y*/ = total - totalTax; 
   
-  printf("%lf", endTotal);
+  printf("The total take home pay before holiday pay is: $%lf\n", endTotal);
+
+  /*calculation of 8% holiday pay*/
+  double holidayPay = holidayPayTax * total;
+  double holidayPayConvert = holidayPayTax / 100;
+  double totalHolidayPayTax = holidayPayConvert * total;
+
+  printf("Your holiday pay before tax is $%lf\n", totalHolidayPayTax);
+
+  /*17.5% tax ontop of Holiday Pay*/
+  double holidayPayAfterTax = tax * holidayPayAfterTax;
+  
+
 
     return 0;
 }
--- 
+++ 
@@ -5,7 +5,7 @@
 
   int hour;
   double amountPerHour;
-  const double tax = 17.5;
+  const double tax /*p*/ = 17.5;
 
   printf("Input the employees total hours worked within a week: ");
   scanf("%d", &hour);
@@ -13,12 +13,13 @@
   printf("Input the employees pay per hour: $");
   scanf("%lf", &amountPerHour);
 
-  //calculation for the percent portion
-  double total = hour * amountPerHour;
+  /*calculation for the percent portion:
+  y(total) = p(tax) * x(total)*/
+  double total /*x*/ = hour * amountPerHour;
   double percentDeduction = tax * total;
   double percentConvert = tax / 100;
   double totalTax = percentConvert * total;
-  double endTotal = total - totalTax; 
+  double endTotal /*y*/ = total - totalTax; 
   
   printf("%lf", endTotal);
 
--- 
+++ 
@@ -18,7 +18,7 @@
   double percentDeduction = tax * total;
   double percentConvert = tax / 100;
   double totalTax = percentConvert * total;
-  double endTotal = totalTax - total; 
+  double endTotal = total - totalTax; 
   
   printf("%lf", endTotal);
 
--- 
+++ 
@@ -5,7 +5,7 @@
 
   int hour;
   double amountPerHour;
-  const int tax = 12;
+  const double tax = 17.5;
 
   printf("Input the employees total hours worked within a week: ");
   scanf("%d", &hour);
@@ -13,8 +13,14 @@
   printf("Input the employees pay per hour: $");
   scanf("%lf", &amountPerHour);
 
-  double total = hour * amountPerHour * 20 / 100;
-  printf("%lf", total);
+  //calculation for the percent portion
+  double total = hour * amountPerHour;
+  double percentDeduction = tax * total;
+  double percentConvert = tax / 100;
+  double totalTax = percentConvert * total;
+  double endTotal = totalTax - total; 
+  
+  printf("%lf", endTotal);
 
     return 0;
 }
--- 
+++ 
@@ -1,11 +1,11 @@
-/* Write a C program that accepts an employees total worked hours of a week and the amount he received per hour. Print the employee's salary in a week (with two decimal places) AFTER 20% TAX. NOT FINISHED */
+/* Write a C program that accepts an employees total worked hours for a week and the amount he received per hour. Print the employee's salary in a week (with two decimal places) AFTER 12% TAX. NOT FINISHED */
 
 #include <stdio.h> 
 int main(void) {
 
   int hour;
   double amountPerHour;
-  const int tax = 20;
+  const int tax = 12;
 
   printf("Input the employees total hours worked within a week: ");
   scanf("%d", &hour);
--- 
+++ 
@@ -0,0 +1,20 @@
+/* Write a C program that accepts an employees total worked hours of a week and the amount he received per hour. Print the employee's salary in a week (with two decimal places) AFTER 20% TAX. NOT FINISHED */
+
+#include <stdio.h> 
+int main(void) {
+
+  int hour;
+  double amountPerHour;
+  const int tax = 20;
+
+  printf("Input the employees total hours worked within a week: ");
+  scanf("%d", &hour);
+
+  printf("Input the employees pay per hour: $");
+  scanf("%lf", &amountPerHour);
+
+  double total = hour * amountPerHour * 20 / 100;
+  printf("%lf", total);
+
+    return 0;
+}