How am i going to do this in turbo c?

This is a discussion on How am i going to do this in turbo c? within the C Programming forums, part of the General Programming Boards category; im planning to make a simple pc builder program.. The user must choose 13 hardware and each hardware has six ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    1

    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.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    We can use the files with the data in them.

    Add marker numbers to each item's entry in the data file.

    Vizio LCD 1 3 4 7 10, etc.

    Might mean that this monitor comes in models corresponding to #1, #3, #4, #7, and #10, etc.


    Since you don't know how to use arrays yet, you'll be scanning through this file, for every hardware piece you look up. Perhaps this is a good time to learn how to use arrays?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Remember Turbo? It is comming back
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2006, 02:26 PM
  2. Cross Compiling with Linux and Turbo C
    By ozgulker in forum Linux Programming
    Replies: 0
    Last Post: 11-18-2002, 03:07 PM
  3. Where can I get a good old Turbo C compiler?
    By sundeeptuteja in forum C Programming
    Replies: 2
    Last Post: 09-15-2002, 08:40 AM
  4. What is Borland and Turbo
    By pratapgj in forum C Programming
    Replies: 1
    Last Post: 07-30-2002, 12:36 PM
  5. Turbo C Compiler
    By thomas in forum C Programming
    Replies: 2
    Last Post: 09-09-2001, 11:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21