In this occasion i will give the script to make the program calculates the volume of a cone using C language. But my friends, on this occasion the script program that i attach below i give to the Indonesian. Why do i give to Indonesian? I give the C programming language scripts, with the Indonesian for my friends in Indonesia who can understand what I write scripts.
For that, i apologize in advance to my friends outside of Indonesia.
Okay, let's get started and watch carefully script below carefully so that you can understand.
/*
Nama File : 091402135_1.c
Nama : Hendro P. Sinaga
NIM : 091402135
Tanggal : 1 Oktober 2010
Deskripsi Program : Tujuan program digunakan untuk menghitung Volume kerucut
*/
#include
#define PI 3.14159
int main() /*This program serves to calculate volume of cone*/
{
float volume, jari2, tinggi;
printf ("Menghitung volume kerucut. \n");
printf("Berikan jari-jari alas: ");
scanf("%f", &jari2);
printf("Berikan tinggi kerucut: ");
scanf("%f", &tinggi);
volume = (PI * tinggi * (jari2*jari2)) / 3.0;
printf("Volume kerucut =%f\n", volume);
printf("press
getchar();
return 0;
}
Note : Silahkan copy script program diatas.