#include <iostream>
#include <stdlib.h>
#include <unistd.h>
using namespace std;
int main()
{ float a,b,c,d,t1,vol,luas;
a=3;
b=4;
c=5;
d=1/(float)2;
t1=10;
cout<<"tinggi prisma :"<<t1<<endl;
vol +=a;
vol *=b;
vol *=d;
vol *=t1;
cout<<"volume prisma:"<<vol<<endl;
a*=b;
a*=d;
a*=2;
t1*=a;
a+=t1;
cout<<"luas permukaan :"<<a<<endl;
//tadi katanya boleh dinamis hm...
}
#include <stdlib.h>
#include <unistd.h>
using namespace std;
int main()
{ float a,b,c,d,t1,vol,luas;
a=3;
b=4;
c=5;
d=1/(float)2;
t1=10;
cout<<"tinggi prisma :"<<t1<<endl;
vol +=a;
vol *=b;
vol *=d;
vol *=t1;
cout<<"volume prisma:"<<vol<<endl;
a*=b;
a*=d;
a*=2;
t1*=a;
a+=t1;
cout<<"luas permukaan :"<<a<<endl;
//tadi katanya boleh dinamis hm...
}