Portfolio Title





 

 

Student Portfolio >> Index >> Coding >> Exercise 17

# include <iostream.h> 
           float larger(float,float); //prototype             
int main()
               { float result, val1,val2;
   cout <<"Enter value1";
   cin >> val1;
   cout << "Enter value2";
   cin >> val2;
   result = larger(val1,val2);
   cout << "\n larger =" <<result;
   return 0;
   } 
float larger ( float firstval, float secondval)
               { float big ;
   if(firstval > secondval);
   big = firstval;
 else if 
   {
   big = secondval; 
   }
   return big;
   }


<< Back                                                                         Forward >>

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

 

Copyright 2005 Kerstin Kegel