Forum: C++ Dec 16th, 2008 |
| Replies: 1 Views: 490 Got it fixed.
Changed
if (patientType == 'I' && patientType == 'i')
to
if (patientType == 'I' || patientType == 'i') |
Forum: C++ Dec 15th, 2008 |
| Replies: 1 Views: 490 Ok I have everything pretty much working except for one small detail. When I do inpatient I need to display the room charges as well as the medication and labs and services. It only displays the... |
Forum: C++ Dec 2nd, 2008 |
| Replies: 16 Views: 778 Ok fixed it so it would display the menu again if you do not select a valid option
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std; |
Forum: C++ Dec 2nd, 2008 |
| Replies: 16 Views: 778 Murtan,
I used your short answer method as we are just starting to learn about functions.
Thanks and problem solved
#include <iostream>
#include <cstdlib>
#include <iomanip> |
Forum: C++ Dec 2nd, 2008 |
| Replies: 16 Views: 778 So would I need to create a function for each problem? |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 Ok I got the loop to work now why am I not generating random numbers each time. It just displays the same numbers each time a selection is picked. It will display random numbers when I re run the... |
Forum: C++ Dec 1st, 2008 |
| Replies: 3 Views: 359 You will need to include this to set width
#include <iomanip>
Then use setw (#) |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 [/code]
Ok I tried to do this and add the choice=6 and deleted the return 0 and nothing.
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime> |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 Ok I just can not get the loop to work. I tried what was in the second post but it does not work. Please help. I am stuck on the code I already posted.
Thanks. |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 I tried to see what you did and tried it but it did not work. |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 Thanks for the help. Would I put that before the else if part of the code? Also the char rep='n'; needs to go at the top where I clarify everything. Also what would I do if I wanted it to either... |
Forum: C++ Dec 1st, 2008 |
| Replies: 16 Views: 778 The code is pretty easy to understand what I am doing. You basically pick a number 1-4 and it will do either addition, subtraction, multiplication, or division. What I need it to do is after they... |
Forum: C++ Nov 20th, 2008 |
| Replies: 6 Views: 341 I made a few changes for you. Good luck with the C++. This website is very helpful.
#include <iostream>
using namespace std ;
int main()
{
cout << "Hello world." << endl; |
Forum: C++ Nov 20th, 2008 |
| Replies: 6 Views: 341 Yea you do not have to use the parentheses around the 0 either after return.
You can just do return 0; |
Forum: C++ Nov 20th, 2008 |
| Replies: 18 Views: 975 Got it working now. I just subracted 0.01 from the total and it comes up with the correct amount. Would there be an easier way to do this?
Thanks.
#include <iostream>
#include <string>... |
Forum: C++ Nov 20th, 2008 |
| Replies: 18 Views: 975 Ok I am just not getting it at all.
I had programming. |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Ok yes I know it is not producing the right result. That is my problem as how do I get the code to produce the right result.
I believe I need to set something to 0 and have it double each day... |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Maybe I am not understanding what you are asking, but this is what my code does right now.
It ask for the number of days worked this month, as long as it is in between 1-31
then it takes the... |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Ok I do put in sample inputs and it comes out producing the correct result. It is basically multiplying .02 * the number of days I put in and out comes the correct amount. I am trying to get the... |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Ok I have done that but it does nothing.
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main ()
{
int days = 1; |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Where would I put this in my code. I am new at this and have found this sit to be very helpful.
Ok I have changed the dailyPay from constant to int. I have created a new variable called... |
Forum: C++ Nov 19th, 2008 |
| Replies: 18 Views: 975 Write a program that calculates how much a person earns in a month if the salary is one penny the first day and doubles each day worked. The program should ask the user for the number of days worked... |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 Thanks for your help. I gave you rep as well. |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 I am very new at this. First time running C++. We have not learned functions yet. What do you mean change the commented parts of the function. I redid some code a little different then what you... |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 Ok here is my final code. Cleaned it up a bit so it would not just say enter a positive number each time a negative number was entered
#include <iostream>
#include <cmath>
using namespace... |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 Ok I got it. Here is my new code
[code=syntax]#include <iostream>
#include <cmath>
using namespace std;
int main () |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 With what you did what part of my code would I add that in. I am just not getting it. I do not have any variable called input. I am lost. |
Forum: C++ Nov 18th, 2008 |
| Replies: 10 Views: 702 |
Forum: C++ Nov 17th, 2008 |
| Replies: 10 Views: 702 I do not want a negative number input for radius, length, width, base, height. How would I do this. My code is below. It should be pretty self explanatory.
Thanks.
[code=syntax]
#include... |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 I will take a look at those when I get home. |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok now I have it correct. The code above would display the correct answer regardless if the correct answer was input or not. The following code only displays the correct answer if the wrong one is... |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok got everything working. Thanks for all the great help here.
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std;
int main ()
{ |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok got it working. Just now have to figure out how to make a statement showing the correct answer if I put in the wrong one.
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include... |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 I do have a book but it does a poor job explaining anything and my teacher I can hardly understand. |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Yea I took that line out but still not getting it
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std;
int main ()
{ |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok still not getting it. No matter what answer I put in it still says great job
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std;
int main ()... |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok that all worked great. Now what would I do if I want to make a statement if the enter the correct answer it produces a statement that says congratulations, but if they enter the wrong answer I... |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Ok try it but did not work.
Here is my new code
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std; |
Forum: C++ Nov 17th, 2008 |
| Replies: 23 Views: 1,431 Will try it in a few. I am installing visual stuidos right now.
Thanks again. |