How am i going to do this in turbo c?
im planning to make a simple pc builder program..
The user must choose 13 hardware and each hardware has six model..
ex.
Monitor:
1. 15 inch lcd 20$
2. 17 inch lcd 25$
3. 20 inch lcd 30$
4. 22 inch lcd 35$
5. 25 inch lcd 40$
6. choose this if you to choose the next hardware..
processor:
1. Intel 1.80 ghz 100$
2. intel 2.00 ghz 120$
3. intel 2.40 ghz 130$
4. intel 2.50 ghz 140$
5. intel 3.00 ghz 150$
6. Choose this to choose the next hardware.
Here is the program that i make.. and i dont know how to continue..
i will just gonna put 2 hardwares..
Code:
#include<stdio.h>
main()
{
int A,B,C,D,E,F,G,H,I,J,K,L,M,N,O;
clrscr();
printf("\n MONITOR");
printf("\n");
printf("\n A visual display unit, often called simply a monitor or display,");
printf("\nis a piece of electrical equipment which displays images generated");
printf("\nfrom the video output of devices such as computers, without");
printf("\nproducing a permanent record. Its like a Television that you use in");
printf("\nyour houses.");
printf("\n");
printf("\nChoose your monitor(These are all LCD Monitors and Widescreen):");
printf("\n");
printf("\n 1. Size:17inches Price:6000 ");
printf("\n 2. Size:19inches Price:9150 ");
printf("\n 3. Size:22inches Price:10500 ");
printf("\n 4. Size:26inches Price:21500 ");
printf("\n 5. Size:28inches Feature:Built-in Speakers Price:29500 ");
printf("\n 6. If don't want monitor, choose this.");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\n");
printf("\nEnter the number of the monitor that you want:");
scanf("%d",&A);
clrscr();
printf("\n KEYBOARD");
printf("\n");
printf("\n In computing, a keyboard is an input device, partially modeled after the typwriter keyboard, which uses an arrangement of buttons and keys, which act as electronic switches. A keyboard typically has characters engraved or");
printf("\nprinted on the keys and each press of a key typically corresponds to a single written symbol. However, to produce some symbols requires pressing and holding several keys simultaneously or in sequence. While most keyboard keys");
printf("\nproduce letters, numbers or signs (characters), other keys or simultaneous key presses can produce actions or computer commands.");
printf("\n");
printf("\n");
printf("\nChoose your keyboard:");
printf("\n");
printf("\n 1. Genius KB 110 Desktop Keyboard Price:240");
printf("\n 2. A4tech Ultra Slim KBS-720 PS2 Price:300");
printf("\n 3. A4tech Ultra Slim KBS-720 USB (W/B) Price:350");
printf("\n 4. Logitech Classic Keyboard (Spill Resistant Price: 300");
printf("\n 5. Logitech Cordless Desktop Wave Laser Price: 3450");
printf("\n 6. If don't want keyboard, choose this.");
printf("\n");
printf("\n");
printf("\n");
printf("\nEnter the number keyboard that you want:"); .................... and so on..]
i want to end it like this
Code:
________________________
You choose This hardwares:
1. Size:17inches Price:6000
3. A4tech Ultra Slim KBS-720 USB (W/B) Price:350
TOTAL: 6350$
___________________________
I want to show the chosen hardware and its total cost.. But i dont know how to do it..T_T
please help.
I dont know how to do arrays.