Thursday, July 3, 2008
#include iostream
#include iomanip
*/
the #include thingy pls put <>
/*
using namespace std;
int smallestnum(int num1, int num2, int num3)
{
int smallest;
if (num1 < num2 && num1 < num3)
smallest = num1;
else if (num2 < num3)
smallest = num2;
else
smallest = num3;
return(smallest);
}
int largestnum(int num1, int num2, int num3)
{
int largest;
if (num1 > num2 && num1 > num3)
largest = num1;
else if (num2 > num3)
largest = num2;
else
largest = num3;
return(largest);
}
double averagenum(int num1, int num2, int num3)
{
double total;
double average;
total = num1 + num2 + num3;
average = total/3;
return(average);
}
int main()
{
int num1, num2, num3, smallest, largest;
double average;
cout << " Enter the first number: "; cin >> num1;
cout << " Enter the second number: "; cin >> num2;
cout << " Enter the third number: "; cin >> num3;
smallest = smallestnum(num1, num2, num3);
cout << "\n The smallest number is " << smallest;
largest = largestnum(num1, num2, num3);
cout << "\n The largest number is " << largest;
average = averagenum(num1, num2, num3);
cout << "\n The average of the three numbers is " << setprecision(10) << average << endl;
}
Done by Abigail...=D
Edit/shorten by Hs...=P
; tortured on 10:36 PM =/
__________________________________
the1B02
ONE class of FIFTEEN gentlemen and FIVE ladies
average age of SEVENTEEN
first met each other on 8th apr 08 at T1442
we are
environmental friendly
theCREWS
Designer: no idea
Code Edited: abigail/han sheng
Picture: photobucket
Host: blogger::
photobucket
Thanks: blogskins
click THIS: ♥
thecopyCATS
this blog was created by HANSHENG.
the templater was ABIGAIL.
blogskin found by JESSLE.
you are NOT ALLOWED to copy or take anything from HERE. trespassers WILL be prosecuted.