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
write a C code that plots an object on the window and on the user''s click of mouse on the window, the object starts rotating continuously until the user presses the mouse again

Write a C program to input 16 numbers and print them out in a table format of 4 wide by 4 deep. E.g.   4    5    5    7   8    9    10    11   12    13    14    15   16    17

Problem: (a) Describe a linked list. (b) Explain the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages o

Explain the Macros? Preprocessor' is a translation stage that is applied to your source code before the compiler proper gets its hands on it. Usually the preprocessor performs

Define Commonly Used Built-in Library Functions? Comprise opened a file pointer you will desire to use it for either input or output. The C language supplies a set of functions

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

C Program for SORTING OF NUMBERS   main() {           int a[20],i,j,temp,n;           clrscr();           printf("ENTER THE MAXIMUM LIMIT: ");           scan

Write a program that reads a line of characters from the user and displays that entire line after converting any uppercase characters to lowercase also change any lowercase charact