NOW I HAVE SHOWED SOME EFFORT PLEASE HELP ME NOW, HERE IT IS WHAT I WOULD LIKE TO HAVE AND WHAT I HAVE DONE WITH THE CODE.


Hi, i have to programm this in c++ can anyone please help me and solve the code i have written

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)Marbel
(2)Stone
(3)Tree
Add number: 2 <<exampel 2 the 2 is stone

Material Volume(dm3) Weight(kg) Price(euro)
-------- --------- -------- --------
Trä 100 260 1500 <<these r the answers

#include <iostream>
using namespace std;

int main()
{

   cout << "\n***********************************************\n"
           "  *               Blockkalkylatron              *   \n"
           "  ***********************************************\n\n";

   cout << "\n    - Bekräfta alla inmatningar med Enter - \n\n";


   cout << "\n    INMATNING AV BLOCKETS DIMENSIONER\n\n";

   int tal1, tal2, tal3, tal4;

   cout << "\nAnge höjd (dm) :    ";               // Ledtext
   cin >> tal1;                                    // Inläsning

   cout << "\nAnge längd (dm) :   ";
   cin >> tal2;

   cout << "\nAnge bredd (dm) :   ";
   cin >> tal3;


   cout << "\nVAL AV MATERIAL \n\n";

   cout << "\n(1) Marmor\n"
           "(2) Sten  \n"
           "(3) Trä   \n\n";

   cout << "\nAnge nummer:   ";
   cin >> tal4;


   cout << "\n" << tal1 << " gpnger " << tal2
        << " blir " << (tal1*tal2*tal3*tal4) << "\n\n";
   return 0;
}

Please solve this, i will be very appreciate, thanks.

You have solved it yourself, just add appropriate couts .

That´s what I do not know how to add those couts? can u please help me!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.