/* priklad p2_1.c
pouzitie makier pre vypocet objemov telies */

#include <stdio.h>
#define PI 3.14159
#define KOCKA(a) (a*a*a)
#define VALEC(v,p) (PI*p*p*v)
#define GULA(r)  (4*PI/3*r*r*r)

void main(void)
{
  float hr=2,v=3;
  printf("Objem kocky so stranou %f je %f\n",hr,KOCKA(hr));
  printf("Objem valca (r=%f, v=%f) je %f\n",hr,v,VALEC(v,hr));
  printf("Objem gule (r=%f) je %f\n",hr,GULA(hr));
}