Thread: Help on 2 programs

  1. #1
    Registered User
    Join Date
    Dec 2014
    Posts
    1

    Help on 2 programs

    hello people im new here
    i want to start by saying these programs will decide if i will pass or fail this course
    i hope you understand
    i have 1 week to submit these programs
    i will appreciate it if you help me

    FIRST Q:
    Each year the Department of Traffic Accidents receives accident count reports from a number of cities and towns across the country. To summarize these reports, the department provides a frequency distribution printout that gives the number of cities reporting accident counts in the following ranges:
    0 – 99
    100 – 199
    200 – 299
    300 – 399
    400 – 499
    500 or above

    The department needs a computer program to take the number of accidents for each reporting city or town and add one to the count for the appropriate accident range. After all the data have been processed, the resulting frequency counts are to be displayed.

    ADDITIONAL INFO: write a main program that reads user input from a data file (input.txt) the data file shows the city name and number of accedents.

    SECOND Q:
    Determine the following information about each
    value in a list of positive integers.
    a. Is the value a multiple of 7, 11, or 13?
    b. Is the sum of the digits odd or even?
    c. Is the value a prime number?
    You should write a function with three type int output
    parameters that send back the answers to these three
    questions. Some sample input data might be:
    104 3773 13 121 77 30751

    ADDITIONAL INFO: write a main program that reads user input from keyboard as shown above. write your output to an output file (output.txt) as follows.
    ----------------------------------------------------------------------------
    Multiple of 7, 11 or 13 Sum of Digits Prime Number
    104 Yes Odd (5) No
    3773 Yes Even (20) No
    … etc ... etc ... etc
    ----------------------------------------------------------------------------
    i wish you all luck
    thank you

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Welcome to the forum.

    The purpose of this forum is to help you when you get stuck on a particular programming problem. We do not hand you completed code, or do all the work for you. See the homework policy: Announcements - General Programming Boards

    You need to attempt the assignments yourself. When you get stuck, post your code (in code tags), and ask a specific question (or questions) about the problems you're having.

  3. #3
    Registered User
    Join Date
    Jun 2014
    Posts
    79
    It's amazing how some teachers can put together problems that lead to completely useless programs! Indeed, that look at least silly to my eyes. I mean, programming should make things easier and provide some sort of utilities, not just produce output numbers that one could obtain in a much easier and faster way by hand.

    In my opinion, the "application" requested in the assignment is utterly pointless.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Quote Originally Posted by aldo_baldo View Post
    In my opinion, the "application" requested in the assignment is utterly pointless.
    It is difficult to design an introductory assignment that produces a useful application. Could you do better?
    bit∙hub [bit-huhb] n. A source and destination for information.

  5. #5
    Registered User
    Join Date
    Jun 2014
    Posts
    79
    Quote Originally Posted by bithub View Post
    It is difficult to design an introductory assignment that produces a useful application. Could you do better?
    Well, I found lots of engaging simple programs in the book I used to learn the C language, so I bet it really is possible to design such introductory assignments. Maybe it's not easy, but it should be feasable.

  6. #6
    Registered User
    Join Date
    Dec 2014
    Posts
    8
    I don't really understand what you want dude.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 11-09-2009, 07:03 AM
  2. Help with programs
    By nesagsar in forum C++ Programming
    Replies: 45
    Last Post: 12-04-2006, 04:29 PM
  3. Programs for Uni? Any help please
    By Blog in forum C Programming
    Replies: 1
    Last Post: 04-30-2004, 06:50 AM
  4. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM