[[lesson_10_getave.cpp]] Rescued by C++ Reloaded

Route:


[user02@FC4 Lesson10]$ cat -n getave.cpp
1 #include <iostream> 2 using namespace std; 3 4 float average_value(int a, int b) 5 { 6 return((a + b) / 2.0); 7 } 8 9 int main() 10 { 11 cout << "The average value is: " << average_value(5, 10) << endl; 12 13 return 0; 14 }
[user02@FC4 Lesson10]$ g++ -o getave getave.cpp
[user02@FC4 Lesson10]$ ./getave
The average value is: 7.5
[user02@FC4 Lesson10]$
lesson_10_getave.cpp, Rev. 1, Last changed on 2005-08-18 06:05, 301 page hits
Wiki hosted for free at wikihost.org || RSS-Feed || GeboGebo 1.3.3 || 00.204 seconds || || PAGERANK TOOLS