Friday, September 17, 2010

#1 Računanje obima kruga uz pomoć konstante Pi

#include <stdio.h>
#include <conio.h>

#define PI 3.145

        main(){
              
        int r=5; //cm
        float obim;
        obim=2*r*PI;
        printf("obim=%f cm",obim);      
          getch();    
              
        }

1 comment:

  1. #include
    #include

    main(){

    int a=5; //cm
    int b=3; //cm
    int c=4; //cm
    float obim;
    obim=a*b*c;
    printf("obim=%f cm",obim);
    getch();


    }

    ReplyDelete