As per the assignment I have to use the function prototypes that you mentioned needed to be removed. Also we haven't covered static const so it cannot be used in the assignment.
Here is the link for more clarification:
http://www2.cs.uh.edu/~acl/cs1410/Assignment/prog4.pdf...
User Profile
Collapse
-
About the scattered function prototypes, I really don't know what to do but it's ok for the time being. When I keep it in do-while loop, it takes no input.
This is how the output is supposed to look like:
CURRENCY EXCHANGE MEXICAN PESOS<>USD
------------------------------------
Buying Pesos Selling Pesos
------------ -------------
$1 = 12.3690 MXN 14.2310 MXN
Select the option
...Leave a comment:
-
Okay so i made this work. Except for 3. Change rate. In this case the exchange rate will be updated by the user and the entire process continues with the new exchange rate. SO how do I do it?? And I am also very much confused about the sentinel thing that will terminate the program.
...Code:#include <iostream> #include <cmath> using namespace std; double setRate(double rate); double rate = 13.30;
Leave a comment:
-
I initialized exchn as a global variable instead but it still doesn't seem to work. It builds fine but when I am debugging it once again skips over the interesting part.
...Code:#include <iostream> #include <cmath> using namespace std; double setRate(double rate); double rate = 13.30; enum exType { BUY, SELL }; int exchn; int main() { doubleLeave a comment:
-
It exits. But doesn't do anything in between. Also I would like to point that I am new to C++. I am enrolled in an 8 week course so everything is pretty much rushed. I'm reading books and trying to implement the idea because obviously I do not want my homework to be done by others. Please help me out. Thank you.Leave a comment:
-
It just prints the code below but nothing else.
...Code:cout << " CURRENCY EXCHANGE MEXICAN PESOS<>USD\n"; cout << "\n--------------------------------------------------\n"; cout << " Buying Pesos" << " " << " Selling Pesos\n"; cout << "\n"; cout << "$1 = 12.3690 MXN" <<
Leave a comment:
-
A program that converts Mexican Peso and USD.(C++
Hey guys! So I have an assignment which requires me to make a program that will determine the buying and selling value of USD and Mexican Peso. The program is to run the entire day and at the end it will have to be terminated using a special sentinel. The idea is that since this is a business we will have to make a profit so that is how the calculate is set up. The program is not complete though but I am facing major problems. If anyone wants the... -
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein CYESSS. DONE! It was just a simple thing that I was missing in the cout
thank you once again sir.Code:cout << currentYear << " " << money << " "<< actualInterest << " " << total << " " << endl;
Leave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein COkay so I edited a little bit. The only problem that remains is making sure all the numbers in a line are orderly spaced in columns.
...Code:#include<iostream> #include<cmath> using namespace std; int main() { double money = 0.0; double interest = 0.0; double actualInterest = 0.0; int year = 0; int currentYear; double total = 0.0;Leave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein CI cannot thank you enough. It worked!! Now all that is needed is tidying up.
...Code:#include<iostream> #include<cmath> using namespace std; int main() { double money = 0.0; double interest = 0.0; double actualInterest = 0.0; int year = 0; int currentYear; double total = 0.0; cout << "Initial deposit: "Leave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein C...Code:/******************************************************** //Name: Md Nabil Ahsan //Course: COSC 1436 //Date: September 27, 2014 //Purpose: The purpose of this program is to print out a table showing the total balances at the end of each year // for various interest rates *********************************************************/ #include<iostream> #include<cmath> using namespace
Leave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein CI was kind of getting it right. But when I'm debugging it, it screws up. But I think I'm getting there. I can see you have been teaching C++ for 20 years! That's amazing. Can you recommend something for a newbie like me? You know, what to read and reference websites.
Here's my code
...Code:#include<iostream> #include<cmath> using namespace std; int main() { double moneyLeave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein C...Code:do { cout << "Initial deposit: "; cin >> money; cout << "Annual interest rate: "; cin >> interest; cout << "Number Of Years: "; cin >> year; double actualInterest = (money*(interest / 100)); double total = money + actualInterest; total++; while cout <<Leave a comment:
-
nabilahsan replied to Print out a table showing the total balances at the end of each year for various intein CI don't know. It's not working. Could you show me? Is it like this?
...Code:do { money += (money*(interest / 100)); total++; { cout << "Initial deposit: " << endl; cin >> money; cout << "Annual interest rate: " << endl; cin >> interest; cout << "Number Of Years: " << endl;Leave a comment:
-
nabilahsan started a topic Print out a table showing the total balances at the end of each year for various intein CPrint out a table showing the total balances at the end of each year for various inte
Hey guys. I'm a newbie and this is my assignment for a class day after tomorrow. Since I'm new to this I made the program but the problem is the answer has to be in this form:
Initial deposit? 10000
Interest rate? 1.2
Number of years? 9
Balances at the end of each year:
Beginning Ending
Year Balance Interest Balance
1 10000.00 110.00 10110.00
2 10110.00 111.21 10221.21...
No activity results to display
Show More
Leave a comment: