Virtual Discussion
CSC490 :: Spring 2000

HOME READ/REPLY POST

FROM: Karl Halliburton
DATE: May 17, 2000
TIME: 23:10:27
REMOTE IP: 152.172.73.83
The exponential value using c++ programming

To calculate the exponential value of a rate over a certain time frame has always baffled me. The truth is this simple mathematical tool has not only save us some money but has been able to propagate our financial future, as bankers, investors and even politicians. I have wriiten this c++ program to demonstrate the following presentation. my intention and hope is to allow us as computer science students to grasp and develop this tool as a financial planner for all of us to come.

This program uses simple methodical approach with a top down design or what we call a modular structure of program.I would hope with this old-fashion programming scheme you will grasp the essence of it

THE EXPONENTIAL PROGRAM

//Karl Halliburton may 17,2000

//Computer Science 490 Prof Klibaner

//InterestRate.cpp Lab 2 version 2

#include<iostream.h>

#include<iomanip.h>

#include<math.h>

#include<conio.h>

// several header files were used from the library: noticable were the

// manipulator file which control the filters setiosflags and setprecision

void main()

{

float result,p,i;

int n;

float calculatedata(float ,float ,int );

// this function calculates the

// rate over a perion specified by the user

cout<<"enter value for p-->"<<endl;

cin>>p;

cout<<"enter value for n-->"<<endl;

cin>>n;

cout<<"enter value for i-->"<<endl;

cin>>i;

result= calculatedata(p,i,n );

// values that are calculated are stored

// in the variable results

cout<<"the result is "<<result<<endl;

}

float calculatedata(float p,float i,int n)

// purpose: to calculate the interest rate of a certain amount of money

//over a set period of time

// result: the rate of interest at a given period of time, this is more

//interactive between the user and the system

{

float a;

a=p*pow((1+i),n); // the assignment to which the value is stored in "a"

cout<<setiosflags(ios::fixed);// the filters that was mention earlier

cout<<setiosflags(ios::showpoint);// control the decimal point(showpoint)

//,takes away the exponential value( fixed)from the results calculated

cout<<setprecision(2);// another filter used to control the amount of

//decimal places. In this case two

return a;

// return value

}

Please reply and tell me what you think


Re: The exponential value using c++ programming
Posted by Bougataya Mehdi on May 30, 2000 at 11:24:50 at IP 172.147.168.64
I think that this preseentation was good; 
but my reply is to the people whom are attaking C++ language by saying it is not convinient. But in fact C++ language is one of the fastest language even the new languages like java aren't fast enough. Probably the only thing which people can reproche to the C++ language is that is not portable...!

Re: The exponential value using c++ programming
Posted by HOI CHUN YUNG on May 27, 2000 at 1:13:12 at IP 209.255.49.55
C++ language, many people say is powerful, but for me, it isn't a good enough for our business market. Compare with Visual Basic, even Visual C++, isn't easy enough to use it. Right now the fast growing on vaious computer language, there actually have some easy to use which can replace C++. For my self, I better kill my time to develop visual basic.

Re: The exponential value using c++ programming
Posted by mkhanum@hotmail.com on May 25, 2000 at 10:48:13 at IP 216.67.6.123
It was really great. I learned a lot from it.

Re: The exponential value using c++ programming
Posted by Jick Gee Chui on May 24, 2000 at 12:41:46 at IP 163.238.34.221
Although I learn C++ a while, I still cannot learn most of it's function. It is hard to know all of it. And this time is talking about the exponential, it is a amazing number for me. Wherever it appears from the computer or mathematics. This program lets me know more about it. I will study it more by my lack of C++ knowledge.

Re: The exponential value using c++ programming
Posted by Joseph Fardella on May 23, 2000 at 23:23:37 at IP 63.23.128.165
That was interesting, and it allowed for a deeper understanding of how applications help in managing funds.

Re: The exponential value using c++ programming
Posted by Kam Tsui on May 23, 2000 at 22:30:42 at IP 4.54.120.229
Wow! I really learned alot from that!

Re: The exponential value using c++ programming
Posted by Dennis Healy on May 23, 2000 at 0:31:56 at IP 152.163.194.207
That was great thanks, everyone needs to learn the power of money!

REPLY TO THIS ARTICLE

Reply Title:

From:

Reply:

 

Email Professor Klibaner with any class questions

Email Han with any questions/problems regarding this site

490.OS5.COM is a service provided by Rainkid Solutions

 

Email Professor Klibaner with any class questions

Email Han with any questions/problems regarding this site

490.OS5.COM is a service provided by Rainkid Solutions