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
Aim: To implement a program for bank account using static data type. Code: class bank {             static int acc_no;             int acc;             float b

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

Program to convert fraction to decimal: int main() {                 float num, denom;     // numerator and denominator of fraction                 float value;


wap to cheak if a number is palindrom

Design a game in c: const DODGERS = 0; const GIANTS = 1;   void main(void) {    int scoreboard [2][9];    // An array two rows by nine columns    int team, i


how to write a program for all the types of beam reactions

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

Variable Declaration This declaration of variables in the C language is permitted only in the starting of their block, prior to executable program statements. In C++ declaratio