Found 400 results
Found 400 results
using namespace std;
string openorclosed; //string for user input for type of mortgage
string open = "open"; //string for open
string closed = "closed"; //string for closed
double termlength = 0; //initializing variable for the length of term input
//defining variables to eliminate magic numbers
double lengthone = 0.5;
double lengthtwo = 1;
double lengththree = 5;
//asking for type and duration of mortgage wanted and storing in defined variables
cout <<"What type of mortgage would you like (open or closed)? ";
cin >> openorclosed;
cout <<"How long of a term would you like?";
cin >> termlength;
if ( openorclosed == "open" ) //if the user input is "open", proceed to inner if statement
if ( termlength == lengthone ) //comparing user input with defined mortgage length
cout << "Mortgage rate is 7.10%"; //output if above is true
else if ( termlength == lengthtwo ) //if above is false
cout << "Mortgage rate is 7.50%"; //output if above is true
else ( termlength != lengthone || termlength != lengthtwo ); //if user input does not equal defined term lengths
cout <<"Sorry, open mortgages are only offered in term lengths of 0.5 years and 1 year" << endl; //output message
else if ( openorclosed == "closed")
if ( termlength == lengthone )
cout << "Mortgage rate is 5.30%";
else if (termlength == lengthtwo )
cout << "Mortgage rate is 5.00%";
else if (termlength == lengththree )
cout << "Mortage rate is 5.75%";
else if ( termlength != lengthone || termlength != lengthtwo || termlength != lengththree )
cout << "Sorry, closed mortgages are only offered in term lengths of 0.5, 1, and 5 years";
cout << "Sorry, we only offer open and closed mortgages" << endl;
Alright, so we're supposed to write a program that will ask the user what type of mortgage they would like (open or closed) and how long of a term they would like. The program will then display the mortgage rate (if it's available).
My problem is when I compile the program, and input open mortgage for however many years, the program outputs all three cout lines.
else ( openorclosed != "open" || "closed" ); cout << "Sorry, we only offer open and closed mortgages" << endl;
Mogwai have three dates announced in Ireland, but the one closest to me (3 hour drive), is on bloody valentines day....
That song is actually called, Untitled, (Popplagið. Now I have no idea what that means in english though.
Seems like everyone has the most problems with the blue/green area in the middle of the spectrum. Interesting.
Anyone know of a good site that has tutorials and whatnot for learning C? My textbook is only marginally helpful and I've found Cprogramming.com which has been helpful but I'm looking for a site that gives a lot more in depth info.
Thanks in advance
Because this is important, and it went unnoticed, I'll quote this so hopefully I could get help on anything. :/
If none you guys want to answer, or know the answer, or whatever, what other forums would you recommend going for this?
Sounded kind of like a Japanese version of newer Avenged Sevenfold but with less obnoxious instrumentals to me. Not really huge on the vocals and nothing stood out to be. 3/10
Greetings, need some help with Firefox please.
Whenever i view an image, say i select the larger image from google, it resizes it too far.. i don't click enlarge or anything, but when i select that tab to view it makes it bigger than the maximum size so parts are slighty blurred. Only starting doing this yesterday..
I have a question. Is This a good laptop choice for me? Let me explain to what I'm looking for: a laptop for school and casual games (some FPS's, but not many and not modern ones.) My price range (strictly) exceeds to no more than $800. I know it doesn't say it in the specs, but the battery life is around 5 hours. Is it a legit notebook for me? I mostly picked it out because of its Video card. It seems like the best one i could get for that price, especially with the seemly decent laptop to go with it.
I was actually able to fix it. The fine folks at the Linux Mint IRC Chat helped me out. Thanks for the offer to help me though. I appreciate that.
Well, I'm still really liking Linux Mint. I'm just having one problem with it that I'm not a fan of. The resolution just isn't that great. I've tried adjusting it and when I went to the correct resolution the colours on my screen went all out of whack. Now I can't even choose the correct resolution. What should I do? I can just reinstall it if I have too. I haven't done a whole lot of customising to it yet.