Saturday, May 22, 2010

(a) Calculate the pressure exerted by 0.5300 mol N2 in a 1.0000 L container at 25.6°C using the ideal gas law.

p = nRT / V = 0.5300 x 0.08206 x 298.7 K / 1.000 =12.99 atm


Using C++ .....?

My code compiles fine but how do I ADD these 3 things to my code before it says credit limit exceeded.... Can someone show me...





Account: 100


Credit Limit: 5500.00


Balance: 5894.78





Then which is already in my code Credit limit exceeded....





Here is my code:


#include %26lt;iostream%26gt;


#include %26lt;iomanip%26gt;





using std::cout;


using std::cin;


using std::endl;


using std::fixed;





# include %26lt;iomanip%26gt;





using std::setprecision;





int main()


{


int accountNumber; // Customers account number


double balance; // Customers balance


double charges; // Charges on the account


double credits; // Credits to the account


double limit; // Credit limit on the account





cout %26lt;%26lt; "Enter account number (-1 to end): " %26lt;%26lt; fixed;


cin %26gt;%26gt; accountNumber; // Code to read customer's account number





while (accountNumber != -1) // begin loop


{


cout %26lt;%26lt; "Enter beginning balance: " %26lt;%26lt; endl; // prompt and read the customers balance


cin %26gt;%26gt; balance;





cout %26lt;%26lt; "Enter total charges: " %26lt;%26lt; endl; // prompt and read the customers charges


cin %26gt;%26gt; charges;





cout %26lt;%26lt; "Enter total credits: " %26lt;%26lt; endl; // prompt and read the customers credit


cin %26gt;%26gt; credits;





cout %26lt;%26lt; "Enter credit limit: " %26lt;%26lt; endl; // prompt and read the customers credit history


cin %26gt;%26gt; limit;





balance = balance + charges - credits; // calculate the new customers balance





if (balance + charges - credits %26gt; limit) // determine if customers credit limit is exceeded


cout %26lt;%26lt; "Credit Limit Exceeded." %26lt;%26lt; endl; // if customers limit is exceeded print message





cout %26lt;%26lt; "\nEnter account number (-1 to end): ";


cin %26gt;%26gt; accountNumber; // reading customers account number


} // End while loop....





cout %26lt;%26lt; endl; // ensure all output is displayed


return 0;


} // end main

Using C++ .....?
You already reassigned balance to equal balance + charges - credits.... so you dont need to say it again in your if statement or else it will be off.





also shouldnt it be balance PLUS credits MINUS charges?





try:


if(balance %26gt; limit)


{


cout %26lt;%26lt; "Credit Limit Exceeded."


}





make sure you bracket because your cout statement is not on the same line as your if statement.


Good Luck


Hope it Helped


R

liama-song

How can I access my local C drive while using remote terminal?

I would like to attach a file from my C drive while using remote terminal. When I select the C drive it is from my remote computer?

How can I access my local C drive while using remote terminal?
Use remote access software, such as scp or remote desktop.


How can I access my local C drive while using remote terminal?

I would like to attach a file from my C drive while using remote terminal. When I select the C drive it is from my remote computer?

How can I access my local C drive while using remote terminal?
Use remote access software, such as scp or remote desktop.


How do I display an image in a CERTAIN P(preferably GIF, PNG, or JPG, but BMP will do) in VC6 / C++ using MFC.

I strictly use MFC if I can, VC6 only. I HATE console apps/code with a passion. They are utterly useless. I am so sick of all these tutorials that just 'paste a pic' on a white 'Edit Box' but don't tell you a thing about HOW in the world it got there! PLEASE for all that is decent and holy in the gaming world, please, please help me without mentionint the following words:





cout, cin, console, Linux, Unix, Mac, iMac, IPOD, VB6, .NET, VC7, vc8, Borland, Builder, CDocument, 'make it a memer of the %^%26amp;#$ class' and so on. I just want to know how do I put an image at the location of X, Y, and how do I CHANGE X and Y. I'd like to be abl to have 2 versions of this code, one where I am able to set the movement myself, and another where I can 'click and drag' the graphic (such as a chess piece or checker?) JPGs have great color as GIFs seem splochy, but only GIFs/PNGs have transparency, although I've heard rumours of transparent JPeGs! A versitle code that can use all 3 would be nice.

How do I display an image in a CERTAIN P(preferably GIF, PNG, or JPG, but BMP will do) in VC6 / C++ using MFC.
i tryed to send you a email but some how it did not go through so i am "answering" here. you are very ignorant about macs. i have worked with a lot of pcs both fast and slow, and never had any thing but problems with them. all pcs are junk compared to macs. macs never get viruses, have the best hardware in the world, and have been rated the best computer of any price. they last long, have all good software, pcs have a lot more software but most of it is junk and if you got rid of all the bad stuff there would be less for pc than theere is for mac. i know what a good computer is and you dont. i will never use a pc again. my mac is the best computer i have ever had, and when i need a new computer i will get a mac. PCs STINK.


Use a matrix to translate triangle ABC with vertices A(-2, 4), B(3, 0) and C(1, 5) using the rule (x, y)(x + 2

Use a matrix to translate triangle ABC with vertices A(-2, 4), B(3, 0) and C(1, 5) using the rule (x, y) translates to (x + 2, y - 3).





a.) What is the translation matrix for this problem? Do your best to type the matrix in rows and columns. You do not have to put the brackets around it.


b.) What is the solution matrix? Again, do your best to type your answer in rows and columns.

Use a matrix to translate triangle ABC with vertices A(-2, 4), B(3, 0) and C(1, 5) using the rule (x, y)(x + 2
x°.... | 1...0 |. .. ....|.x..| ......| 2....|


.... = |..........|...X ..| ...| .. + .|......|


y°.... | 0 ...1.| ....... | y | .......| -3.|








A° (0/1) , B°(5/-3) , C°(3/2)
Reply:Hi,





[-2...4]..+..[.2..-3] = [0...1]


[.3...0]..+..[.2..-3] = [5..-3]


[.1...5]..+..[.2..-3] = [3...2]





I hope that helps!! :-)
Reply:yes i know one site ,you can take home work help also yes they will sure help you and they provide u session .just open www.tcyonline.com and click on there live support and if u want math help they can sure help you just click on this and fill ur name and in question Write i want free demo as kanpreesays if u need my help to know more mail me at kanpree@gmail.com

garden state

Linking Problem in visual C++ version 6 using vista, plzzzzz help??!!?

hey everyone, plz some1 help me with this.... newly i've been using windows vista... all went smoothly until this... i've installed microsoft visual C++ v.6 enterprise edition.... welll, it got installed and everything but whenever i create a program, even program codes as simple as cout%26lt;%26lt;"hello world", it gives me a linking error.... i really dunno y... i've been usin c++ for a yr now but that's the first time i encounter such trauma... plz some1 help me solve it!!!!





Thanx and Cheers ^__^

Linking Problem in visual C++ version 6 using vista, plzzzzz help??!!?
Every program is linked with the standard libraries defined in the project option in VC++ to create a final executable.In this case you would need the stdc++ library.Add it manually to the list of libraries which you can find under the projects option or specify the path while you are linking on the command line like this


cl /MD /Itargetdir\include your_prog.c stdlib.lib


ref: http://www.nag.co.uk/numeric/CL/classoci...


. That should do.Even then if you are not able to link,means your runtime dll is not available.Am not sure how to proceed then.
Reply:hmm...


it's compatible with win vista!!


i think u should reinstall it and try again...


or may be reinstall ur windows vista...


or u may try to update ur visual c++..


bcoz visual c++ 2005 also have the same problem on vista...





hmm..u know how to create and modify program??


contact me at vc-1987@hotmail.com





i have an emulator that have time trail 10minutes..


only can use each restart but only for 10minutres...





can u help me to delete the time trial...???


\contact me at : vc-1987@hotmail.com





thanks...