listing program menghitung luas dan volume balok dengan C | IT Garut | Tips | Trik | Ilmu Komputer | Download Tutorial Komputer listing program menghitung luas dan volume balok dengan C : IT Center Garut

listing program menghitung luas dan volume balok dengan C

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

void main()
{
printf("Luas dan Volume Balok :\n ");
int p, l, t;
float V, Lu;
printf("Panjang=");scanf("%d",&p);
printf("Lebar=");scanf("%d",&l);
printf("Tinggi=");scanf("%d",&t);

V=p*l*t;
Lu=(2*p*t)+(2*p*l)+(2*t*l);

printf("\nVolume=%0.2f",V);
printf("\nLuas=%0.2f",Lu);
getch();
     
}

OUTPUT PROGRAM


Artikel Terkait

0 komentar:

Post a Comment