Advertisement
FRiTZZY

OR_T1_Z5

Oct 30th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. /* OR_Tutorijal_1 Zadatak_5 */
  2. #include <stdio.h>
  3.  
  4. #define PI 3.14
  5.  
  6. int main()
  7. {
  8.     double r, area, volume;
  9.     /* Unos poluprecnika sa tastature i izracunavanje */
  10.     printf("Unesite poluprecnik: ");
  11.     scanf ("%lf", &r);
  12.     /* formule za računanje površine i zapremine */
  13.     area = r * r * PI;
  14.     volume = r * r * r * PI * 4.0f / 3.0f;
  15.     /* Ispis na monitoru*/
  16.     printf("Povrsina kruga sa poluprecnikom %2.2f je %.2f \n", r, area);
  17.     printf("Zapremina kugle sa poluprecnikom %2.2f je %.2f \n", r, volume);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement