Thread: C Project

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    5

    C Project

    hey guys i got a project at school even though am a noob here and am a nob programmer i am having a lil problem with it my main problem is using structures and files hope yall can help when yall respond i will ppst the question i got and i will ppost the coding to what i have so far thank u very much and i will b an active member here

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    you could start by posting the code and error... And do not require from me to post this meaningless message
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    5
    Code:
    this is the code i have thinked of so far 
    #include <stdio.h>
    #include <conio.h>
    #include <stdlib.h>
    
    void add_prop (void);
    void mod_prop (void);
    void prop_trans (void);
    void menu (void);
    void sale_trans (void);
    void edit_street_name (void);
    void edit_street_num(void);
    
    
    
    
    
    main()
    {
    int stat;
    printf("Welcome To Auction Me Reality Services\n");
    printf("cls");
    
    menu();
    
    
    getch();
    return 0;
    }
    
    void menu (void)
    {
    int opt, i;
    
    printf("1. Add A Property To The System\n2. To Modify A Property On The System\n3.Starts A Transaction\n4. Exit\n");
    scanf("&#37;d", &opt);
    switch (opt)
    {
    case 1:   i = add_prop();
    break;
    case 2: i =  mod_prop();
    break;
    case 3: i = prop_trans();
    break;
    case 4:
    printf("Thank You For Using AMRS\n");
    break;
    default: menu();
    break;
    }
    }
    
    void add_prop (void)
    {
    
    int adminpass[4]={0},pass[4],u;
    u = rand();
    struct properties
    {
    int prop_id, strt_num[6];
    char strt_name[20],date_bgt[9];
    };
    printf("Admin Please Enter Your Password to proceed\n");
    scanf("%d", pass);
    while strcmp(pass, adminpass == 0 )
    {
    printf("Please Enter Property Street Name , Street Number, Date Bought\n");
    scanf("%s%%d%s", strt_name, strt_num, date_bgt);
    prop_id = rand();
    
    
    
    }
    
    void mod_prop (void)
    {
    
     int adminpass[4]={0},pass[4]choice;
     printf("Admin Please Enter Your Password to proceed\n");
    scanf("%d", pass[]);
    while strcmp(pass, adminpass== 0 )
    {
    printf("Please Enter The Property Id Number You Would Like To Modify\n");
    scanf("%d", prop_id);
    printf("1. edit street number\n2. edit street name\n");
    scanf("%d",  choice);
    switch (choice )
    {
    case 1:  edit_street_name();
    break;
    case 2: edit_street_num();
    break;
    default: menu();
    break;
    }
    }
    
    
    
    
    
    
    
    
    void prop_trans (void)
    {
    struct p_info
    {
    int tax_reg[7], p_num[7];
    
    
    char name[10];
    }
    int count, i;
    float bid, highest_bid = 0;
     do
     {
     printf("Please Enter Your tax_reg, phone number name\n");
     scanf("%d%d%s%f", &tax_reg[i], &p_num[i], &name[i]);
      for (count = 0; count < 3; count++)
      {
    
       if (bid < highest_bid)
       {
       printf("Please Enter Your Bid");
       scanf("%d", &bid);
       }
      }
      prop_trans();
     while (bid < highest_bid)
     }
        if (bid > highest_bid)
        {
        printf("this bidder now owns the house ");
        }
    
    
    }
    
    void edit_street_name (void)
    {
    printf("Please Enter The New Street Name\n");
    scanf("%s", strt_name);
    }
    
    void edit_street_num(void)
    {
    printf("Please Enter The New Street Number\n");
    scanf("%d", strt_num);
    }
    its really course work for the project and this is the question
    AMRS is a real estate company which purchases repossessed properties then auctions them for. interested persons are invited to make an offer on the property during a specific period, after which the person offering the highest amount on a property will be invited to purchase the prop.

    the comp stores the following data on each prop, prop idnum, that is automatically generated, street name and number, date bought purchase amount begin date of offer period end date of o. period and a status to determine whether the property is available or has been sold. all props are availabe by default until an offer is made and the sale transaction finalized when the interested buyer provides a cheque for the offer amount.
    persons interested in making offers provide their name tax payer reg. number. phone number, the prop that they wish to bid on and the amt being offered. upon submission of this info, a check is made to determine if the offer made is the highest offer for hat particular prop. the interested buyer can make up to 3 bid for a prop within the offer period specified, if the system determines that the amount being offered was not the highest offer. the prospective buyer is also to be informed of the number of remaining bids that can be made on that specific property. at the close of the offer peropd, if the successful bidder submits a cheque with the total amount of the offer, the prop info is updated to reflect that the prop is no longer available for purchase
    you are required to design a system that will allow amrs to
    add props to the system
    modify data on the props
    accept offers for available props
    finalize sale trans
    prepare a sales income report which lists for each prop its prop id num, street num and name , purchase amt sale amt and whether a profit or loss wase made on the prop. the report should be orderd by street name. the report should also sho te total money amrs spent on these props, the total money received and the total profit or loss made
    prepare a report on the available props
    prepare a report on the bid that have been made for a specific prop.
    well there goes the question and what i have done so far am a bit on the lazy side.
    Last edited by Salem; 03-25-2008 at 01:51 PM. Reason: Fixed tags

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    5
    its really course work for the project and this is the question
    AMRS is a real estate company which purchases repossessed properties then auctions them for. interested persons are invited to make an offer on the property during a specific period, after which the person offering the highest amount on a property will be invited to purchase the prop.

    the comp stores the following data on each prop, prop idnum, that is automatically generated, street name and number, date bought purchase amount begin date of offer period end date of o. period and a status to determine whether the property is available or has been sold. all props are availabe by default until an offer is made and the sale transaction finalized when the interested buyer provides a cheque for the offer amount.
    persons interested in making offers provide their name tax payer reg. number. phone number, the prop that they wish to bid on and the amt being offered. upon submission of this info, a check is made to determine if the offer made is the highest offer for hat particular prop. the interested buyer can make up to 3 bid for a prop within the offer period specified, if the system determines that the amount being offered was not the highest offer. the prospective buyer is also to be informed of the number of remaining bids that can be made on that specific property. at the close of the offer peropd, if the successful bidder submits a cheque with the total amount of the offer, the prop info is updated to reflect that the prop is no longer available for purchase
    you are required to design a system that will allow amrs to
    1.add props to the system
    2.modify data on the props
    3.Accept offers for available props
    4.finalize sale trans
    5.prepare a sales income report which lists for each prop its prop id num, street num and name , purchase amt sale amt and whether a profit or loss wase made on the prop. the report should be orderd by street name. the report should also sho te total money amrs spent on these props, the total money received and the total profit or loss made
    6.prepare a report on the available props
    7.prepare a report on the bid that have been made for a specific prop.
    well there goes the question and what i have done so far am a bit on the lazy side.

  5. #5
    Nub SWE
    Join Date
    Mar 2008
    Location
    Dallas, TX
    Posts
    133
    Quote Originally Posted by runnings View Post
    ...am a bit on the lazy side.
    You could not be in a worse place.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You can put your "reply text" outside the code to make it easier for everyone.
    Only code is supposed to be inside the code tags.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    5
    SORRY BOUT THat i posted the code and the question that i got i just wanted a lil help on it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 09:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM