0

Please help how can I add or correct the architecture program where the user will ask what he wants to do, whether it be a windo

#include <iostream> #include <conio.h> #include <math.h> using namespace std; int main () {       int measures, price, architecture;       int opc;       char materials [100];       cout << "\ nTell me what you are going to do about architecture:";       cout << types of architecture;       switch (opc)       case 1:       cout << "door";       break;       case 2:       cout << "window";       break;       case 3:       cout << "bedroom furniture";       break;       default:       cout << "\ nfor the moment no thanks";       if (gate <= 0)       cout << what material do you want to use       cout << "1.fierro";       cout << "2.steel";       cout << "3. welding plant";       cout << "4.tubular";       cout << "5.hinge";                   getch ();      return 0; }

1st Jun 2020, 12:13 AM
Shacai Suk
Shacai Suk - avatar
8 ответов
+ 2
As far as I can see you haven't defined OPC and yet your trying to run a switch statement with it...maybe you could give a sample input, expected output and add a file with your code so I can have a look.
1st Jun 2020, 5:57 PM
Olivia
Olivia - avatar
+ 2
Your welcome I'd like to do whatever I can to help 😊
1st Jun 2020, 7:24 PM
Olivia
Olivia - avatar
+ 1
That's right, what I ask for is help or ideas for this program is not completed but no more or less as I do, I would greatly appreciate help to this architectural program
1st Jun 2020, 6:02 PM
Shacai Suk
Shacai Suk - avatar
+ 1
It sounds like that can all be done with switch statements or if/else statements. Use cin to take input for each variable (cost, material ect.) Then repeat process for each to give all answers 🙂
1st Jun 2020, 6:28 PM
Olivia
Olivia - avatar
0
I'd suggest moving the bottom set of cout<<1fierro > cout<<5.hinge To the top (inside main oc). Write cin>>opc; I think this should work for the bit of code I can see. I'm not sure what you plan on doing with measures price and architecture. Also you seem to have forgotten quotation marks in cout<<types of arch...
1st Jun 2020, 6:21 PM
Olivia
Olivia - avatar
0
Thank you very much, my project is to make an architecture program where the user asks what is the fence to do if a window door etc, and asks what materials will be used and what is the price and if you want a border or decorations in the design that fence to choose I hope and explain. Thanks for correcting and I hope and people help me come up with ideas for this project.
1st Jun 2020, 6:25 PM
Shacai Suk
Shacai Suk - avatar
0
Thank you Olivia I thank you very much
1st Jun 2020, 6:30 PM
Shacai Suk
Shacai Suk - avatar
0
That's good about helping people who need support👏👏💜
1st Jun 2020, 7:31 PM
Shacai Suk
Shacai Suk - avatar