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

Objective Using C++ string, classes, constructors and member functions. Task A Write a program (book.cpp) to store a list of book titles and the published dates. Your pro

Program is to search for a given character in a string: Program is to search for a given character in a string and print point of match char *stsearch(char *string, char sea

How do you know that your class requires a virtual destructor? A: If at least your class has one virtual function, you must make a destructor for this class virtual. It will let

In this worksheet you are asked to write three classes in C++: Lecture class, Course class and University class. The classes relate to each other in the way that a Course has many

how to write a c program for stone game

electricity biil code

.Create a Csharp solution that will show a maze in the user interface and will show a mouse walking through the maze attempting to locate the exit door (the cheese).

write an algorithm to swap values without using third variable

#questionAt 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