Portfolio Title





 

 

Student Portfolio >> Index >> Coding >> Exercise 6

#include <iostream.h>
           int findave(float, float, float);             
int main()
               { int ave=0;
   float one, two, three;
   cout << "Enter First Value: ";
   cin >> one;
   cout <<"Enter Second Value: ";
   cin >> two;
   cout <<"Enter Third Value: ";
   cin >> three;
   ave=findave(one,two,three);
   cout << "The Average of "<<one<<", "<<two<<" & "<<three<< " is "<< ave<<endl;
   return 0;
   }
int findave(float one, float two, float three)
               { float average, averagetot;
   averagetot = one + two + three;
   average = averagetot / 3; 
   return average; 
   }


<< Back                                                                                                                                                                                        Forward >>

Coding | Website Scripting | Visual Design | Instructional Design | Website Design | Website Design Tools

 

Copyright 2005 Kerstin Kegel