Welcome Guest [Log In] [Register]
Welcome to Everyone Is Welcome Outreach Ministries Bringing You To Know Jesus Christ. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Maturity Value.cpp Homework Assignment 2 Part B
Topic Started: Oct 28 2004, 12:27 AM (537 Views)
Vision
Member Avatar
Administrator Of EIWOM
[ *  *  *  *  *  * ]
// Maturity Value.cpp Program finds the maturity value on a deposit at interest rate 4,5,6 and 7 percent
// Jadeson Bynoe 27th October 2004

#include <iostream>
#include <cmath>
using namespace std;

//function prototype

float mat_val (int, float, int);

int main()
{
int principal = 0.0;
float rate = 4.0;
int years = 0.0;

cout << "Enter the principal:";
cin >> principal;
cout << "Enter number of years: ";
cin >> years;

while (rate <8)
{
cout << "Maturity Value:" << mat_val (principal, rate, years) << endl;
rate = rate + 1;

cout << "Enter the principal: ";
cin >> principal;
cout << "Enter number years: ";
cin >> years;

}//endwhile


return 0;

}//endofmainfunction


//***programme-defined functions****

float mat_val (int principal, float rate, int years)

{
// Calculate
return principal * pow((1 + rate/100), years);
}

Hey the best thing has happened to me and it can happen to you to, you can believe and Pray to God and make the same decision I did, Pray ask God to forgive you of your sins and He will hear you He loves you He will forgive you and make you His child

being confident of this very thing, that He who has begun a good work in you will complete it until the day of Jesus Christ (Philippians 1:6)

KEEP COMING (Luke 18:1-8)
Offline Profile Quote Post Goto Top
 
Vision
Member Avatar
Administrator Of EIWOM
[ *  *  *  *  *  * ]
Hallelujah Glory Be To God Hallelujah Hallelujah " let Everything that has breath praise the Lord praise the Lord " Psalm 150 Verse 6 Hallelujah <== the highest note of praise to God
Hey the best thing has happened to me and it can happen to you to, you can believe and Pray to God and make the same decision I did, Pray ask God to forgive you of your sins and He will hear you He loves you He will forgive you and make you His child

being confident of this very thing, that He who has begun a good work in you will complete it until the day of Jesus Christ (Philippians 1:6)

KEEP COMING (Luke 18:1-8)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · School And Homework · Next Topic »
Add Reply