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
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Q: But MFC appear to encourage the employ of catch-by-pointer; should I do the similar? A: Depends. If you're utilizing MFC and catching one of their exceptions, by all means, d

Assume variables x, f, and d are of type int, float, and double, respectively.  Their values are arbitrary, except that neither f nor d equals +∞, -∞, or NaN .  For each of the fo

The Special Pointer 'this' When various instances of a class come into existence, it naturally follows that each instance has its own copy of member variables. If this were not

volume of a sphere

Public derivation Public derivations are much more common than private derivations. In this situation: The private members inherited from the base class are inaccessible


superposition of two waves

Refactoring Project Description: TASK 1 - DESIGN ALGORITHM You are required to design a suitable solution algorithm by using structured chart, pseudocode or flowchart. Thi

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec