home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD2.mdf
/
c
/
tcpp
/
examples
/
ex3.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-09
|
376b
|
22 lines
// ex3.cpp: Inline-Funktionen
// aus Kapitel 6 der Einführung
#include <iostream.h>
const float Pi = 3.1415926;
inline float area(const float r)
{ return Pi * r * r;
}
main()
{
float radius;
cout << "Geben Sie den Radius eines Kreises "
"an: ";
cin >> radius;
cout << "Die Fläche beträgt " << area(radius)
<< "\n";
}