rendered paste bodyCODE
----------------------------------------------------------------------------------------------
#include <iostream>
#include <conio.h> //getch() funktionen kräver detta!
using namespace std;
int main()
{
cout << "\n************************************\n";
cout << "\n* Blockkalkylator *\n";
cout << "\n************************************\n";
cout << "\n INMATNING AV BLOCKETS DIMENSIONER\n";
int heltal1, heltal2, heltal3;
cout << "\nAnge h\x94jd(dm):";
cin >> heltal1;
cout << "\nAnge l\x84ngd(dm):";
cin >> heltal2;
cout << "\nAnge bredd(dm):";
cin >> heltal3;
cout << "\nVAL AV MATERIAL\n";
cout << "\n<1> Marmor\n";
cout << "<2> Sten\n";
cout << "<3> Tr\x84\n";
cout << "Ange number:";
int heltal4;
heltal4 = getch();
cin >> heltal4;
switch (heltal4)
{
case '1':
cout << "Marmor";
break;
case '2':
cout << "Sten";
break;
case '3':
cout << "Tr\x84";
break;
default:
cout << "Du har inte valt n\x86gon siffra!";
}
cout << '\n\n\n\n';
cout << "\nMaterial Volym(dm) weight(kg) Price(kr)\n";
cout << "-------- --------- -------- ---------";
cout << "\n\n";
return 0;
}
----------------------------------------------
I NEED TO DO THIS
Material Weight (kg / dm3) Price (euro / dm3)
Marbel 2,7 20
Stone 2,6 15
Tree 0,6 7
these three item have diffrent price and diffrent weight.
Programming based on for users input: Height, width, length and material, than calculate the volume, weight and price and this must be write out on summary way.
programm must be writte like this exampel:
Add height:4
Add width:5
Add Length:5
(1)Marmor
(2)Sten
(3)Tra
Add number: 2 <<exampel 2 the 2 is stone
Material Volume(dm3) Weight(kg) Price(euro)
-------- --------- -------- --------
Trä 100 260 1500 <<these r the answers