Jun 8 2007

Average rain fall calculator for C++

Posted by Bill Betournay at 9:16 AM
5 comments
- Categories: C++

A snippet in C++ to calculate Average Rain. Class Assign #1

If you're planning to use this for one of your assignments you need to be warned that your teach will likely recognize this.

Coldfusion Version is here http://www.datapacks.com/MB/post.cfm/average-rainfall-calculator

// Program Name: average rain fall
// Date Created: Oct 13.2005
// Date Last Compiled: Oct 13.2005
// Purpose: calculate average rain fall for 3 months


void main (void)

{

float
m1 = 0.00,
m2 = 0.00,
m3 = 0.00,
avg = 0.00;

cout << "\n\t Enter the rain fall for the month of June(mm) : ";

cin >> m1;

cout << "\n\t Enter the rain fall for the month of July(mm) : ";

cin >> m2;

cout << "\n\t Enter the rain fall for the month of Aug(mm) : ";

cin >> m3;

avg = (m1 + m2 + m3)/3;

system("cls");

cout.precision(2);
cout.setf(ios :: fixed | ios :: showpoint);

cout << "\n\t Average rain fall for June, July and Aug is " << (avg) << " millimeters" << "\n\t";

}

Comments

DonaMCCOY22

DonaMCCOY22 wrote on 04/16/10 6:32 PM

You do a great job. I have already suggested your source to friends because I find it very profitable especially when you need some information on your <a href="http://www.primewritings.com">essays</a>; or <a href="http://www.primewritings.com">custom research papers</a>. Thanks again.
freelance writer

freelance writer wrote on 04/27/10 7:56 AM

Big basis of information just about this good post some people see choosing the essay writers .
resume writers

resume writers wrote on 04/27/10 7:56 AM

If you try to find locality where you can get resume here is very complete place for you about this topic, which accommodate examples and gives an excuse to learn how make great CV resumes . But this site is more charismatic, and more crucial.
professional resume writers

professional resume writers wrote on 06/16/10 9:48 AM

great job.....thanks for sharing this!!
replica handbags

replica handbags wrote on 07/07/10 12:37 AM

Thanks for posting this tutorial it has been a great help. .yangyiyi100707

Write your comment



(it will not be displayed)