From 8e0a55db5d0f871fbbcc9ed7a8055ef2d439e248 Mon Sep 17 00:00:00 2001 From: Tavien Date: Fri, 1 Nov 2019 09:07:03 -0700 Subject: [PATCH] Fixed issues and pull request --- Compound Interest/Problem.txt | 7 ++++ Compound Interest/Solution.cpp | 26 ++++++++++++++ Port Scanner (Python)/Problem.txt | 1 + Port Scanner (Python)/Solution.py | 47 +++++++++++++++++++++++++ Sales Tax -Beginners Python/Problem.txt | 1 + Sales Tax -Beginners Python/Solution.py | 7 ++++ 6 files changed, 89 insertions(+) create mode 100644 Compound Interest/Problem.txt create mode 100644 Compound Interest/Solution.cpp create mode 100644 Port Scanner (Python)/Problem.txt create mode 100644 Port Scanner (Python)/Solution.py create mode 100644 Sales Tax -Beginners Python/Problem.txt create mode 100644 Sales Tax -Beginners Python/Solution.py diff --git a/Compound Interest/Problem.txt b/Compound Interest/Problem.txt new file mode 100644 index 0000000..a81048e --- /dev/null +++ b/Compound Interest/Problem.txt @@ -0,0 +1,7 @@ +A person invests 1000.00 in a savings account yeilding 5 percent interest. Assuming that all interest is left on deposit in the account, calculate and print the amount of money in the account at the end of each year for 10 years. Use the following formula for determining these amounts: +a = p(1+r)^n +where +p is original amount invested (principal) +r is the annual interest rate +n is the number of years +a is the amount on deposit at the end of n years \ No newline at end of file diff --git a/Compound Interest/Solution.cpp b/Compound Interest/Solution.cpp new file mode 100644 index 0000000..e182ffc --- /dev/null +++ b/Compound Interest/Solution.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +using namespace std; + +int main() +{ + double amount; + double p = 1000.0; + double r = .05; + + cout <<" Year: " << setw(21) <<" Deposit amount"<