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 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answers
+ 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