pharaoh fortune slot
ExamNotes.net
Welcome, Guest. Please login or register.
November 18, 2017, 03:42:13 PM

Login with username, password and session length
* Home Help Search Login Register
+  ExamNotes.net
|-+  General discussions
| |-+  Programming Forum
| | |-+  What's wrong with this??? I'm just learning
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: What's wrong with this??? I'm just learning  (Read 730 times)
huguenintammie
Junior Member

Offline Offline

Posts: 1

0


View Profile
« on: September 12, 2004, 09:40:50 PM »

#include
  using namespace std;

  int main ()
  {
     //declare variables
         float interest;
        float finalvalue;
        float originalamountinvested;
        float rateofinterest;
        float numberofyearsinvested;

     // Input values needed.
        cout << "What is the original amount invested?     $";
        cin  >> originalamountinvested;
        cout << "What is the rate of interest?              ";
        cin  >> rateofinterest;
        cout << "What are the number of years invested?     ";
        cin  >> numberofyearsinvested;
        
        //Calculate PRT(P*R*T)= Interest
        //Calculate FV (P*I)
        interest = originalamountinvested * rateofinterest * numberofyearsinvested;
        finalvalue = originalamountinvested * interest;

        //Print results
        cout << "This is investment's total interest" << interest << ." \n";
        cout << "The final value is " <
        return 0;
  }
Sad
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!