GIP 5

#include <iostream>
 
using namespace std;
 
void hw(void)
{
	cout << "Hello wordl!" << endl;
}
 
void cbv1(double d)
{
	cout << d << endl;
}
 
char cbv2 (double d)
{
	if(d >= 0)
	{
		return 'p';
	}
	return 'n';
}
void cbr1(float &f)
{
	f = 12.345;
}
 
int cube(int l, int b, int h=1)
{
	return l * b * h;
}
 
int main (void)
{
	/* Aufgabe a) */
	hw();
 
	/* Aufgabe b) */
	cout << "Wert von a in cbv1 = ";
	cbv1(12.6);
 
	/* Aufgabe c) */
	double d = 7.1234;
	cout << "Wert von a in cbv1 = ";
	cbv1( d );
 
	/* Aufgabe d) */
	cout << "Ergebnis von cbv2 mit Parameter -23: " << cbv2 (-23) << endl;;
	cout << "Ergebnis von cbv2 mit Parameter +10: " << cbv2 (10) << endl;;
 
	/* Aufgabe e) */
	float f=0;
	cout << "Vor dem Aufruf von cbr1: f = " << f << endl;
	cbr1(f);
	cout << "Vor dem Aufruf von cbr1: f = " << f << endl;
 
	/* Aufgabe f) */
	cout << "Daten (L: 10 B: 11 H: 12)" << endl << "Rauminhalt: " << cube( 10, 11, 12 ) << endl;
 
	cout << "Daten (L: 10 B: 11 H: 1)" << endl << "Flaeche: " << cube( 10, 11 )  << endl;
 
	return 0;
}