Thread: Need help to solve this program

  1. #1
    Registered User kitymarine's Avatar
    Join Date
    Jun 2011
    Posts
    18

    Smile Need help to solve this program

    I need to solve the following problem as assigned by the professor ,he gave me hard time to use the function and idents in every line I need help to start with this new code..I will appreciate your help ..I am stuck cuz I have other exams in some class..I dont know how I am gonna prompt the user
    Write a C program that prompts the user to enter some information about up to ten individuals. (Think of a way to prompt the user) It should store this information in a structure. T
    Your program should include a structure with a tag name of: info. It should contain the following data as members:

    a character array to store person's name, defined as: name[30]
    a character array to store person's street address, defined as: address[30]
    a character array to store person's city, defined as: city[20]
    a character array to store person's state, defined as: state[3]
    a long integer variable to store person's zip code, defined as: zip
    an integer variable to store person's age, defined as: age
    a character variable to store person's gender, defined as: gender

    You need to define an array of type: struct info. You can call this array: people[10].

    The dialog with the user must be as follows:


    Whatever Title you want Here including a
    “How many prompt” etc.

    Enter name: Minnie Mouse
    Enter street address: 100 Disney Drive
    Enter city: Orlando
    Enter state: FL
    Enter zip code: 99990
    Enter age: 25
    Enter gender (M or F): F

    Enter name: Big Bird
    Enter street address: 10 Sesame Street
    Enter city: Funtown
    Enter state: MA
    Enter zip code: 01222
    Enter age: 20

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,509
    Let's see what you have written so far. Be sure to use code tags.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,537
    Start a new thread when you have some actual effort to show, not just a dump of your assignment because "I have other exams in some class"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. i have a problem in my program that iam not able to solve
    By bahaahathout in forum C++ Programming
    Replies: 7
    Last Post: 04-13-2011, 06:06 AM
  2. cant solve my program's error
    By kaktus in forum C Programming
    Replies: 1
    Last Post: 12-16-2010, 01:14 PM
  3. can u solve this program :P
    By bawen in forum C++ Programming
    Replies: 1
    Last Post: 07-24-2006, 12:16 PM
  4. Need help to solve program errors
    By pattop in forum C++ Programming
    Replies: 6
    Last Post: 05-28-2006, 01:57 AM