Assignment1 PDF
Assignment1 PDF
Assignment1 PDF
2: Name : Syafiq
3: Date : 21 March 2018
4: Group : RAP2204C
5: Title : Calculation for Area and Volume
6: *************************************************/
7:
8: #include<iostream>
9: using namespace std;
10: int main()
11:
12: {
13: double base, width, height, volume, area;
14:
15: //input
16: cout<<"Enter base:";
17: cin>>base;
18: cout<<"Enter width:";
19: cin>>width;
20: cout<<"Enter height:";
21: cin>>height;
22:
23: //process
24: area=0.5*base*width;
25: volume=base*width*height;
26:
27: //output
28: cout<<"\n Your Area = "<<area;
29: cout<<"\n Your Volume = "<<volume;
30:
31: return 0;
32: }
33: