Simple program of c++ , C/C++ Programming

Simple program of c++:

int main()

{

   int   bushels;

   float dollars, rate;

                cout << "How many dollars did you get? $";

                cin >> dollars;

                cout << "For how many bushels? ";

                cin >> bushels;

                rate = dollars / bushels;

                cout.precision(2);

                cout << "You have received $" << rate << " for each bushel.\n";

 

   return 0;

}

Posted Date: 10/18/2012 7:54:08 AM | Location : United States







Related Discussions:- Simple program of c++ , Assignment Help, Ask Question on Simple program of c++ , Get Answer, Expert's Help, Simple program of c++ Discussions

Write discussion on Simple program of c++
Your posts are moderated
Related Questions
There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Question: a) Give two uses of NFS. b) Give one advantage of using NFS. c) Explain the following lines as they would be interpreted in the /etc/exports file i. /usr/local

write a program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x) between the limits of a and b #include float start_point,




Explain the terms- Substitutability and Extensibility Substitutability - The objects of a properly derived class can be safely and easily substituted for an object of its

Q-What happens while a function throws an exception which was not specified through an exception specification for this function? A: Unexpected() is called, which, by default, w

Define some Important Point for bit fields with structures? Only n lower bits will be assigned to an n bit number thus type cannot take values larger than 15 (4 bits long)

the program that solve the efficiency of otto cycle