# Thread: Help on 2 programs

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. 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. 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. Originally Posted by aldo_baldo
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?

5. Originally Posted by bithub
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. I don't really understand what you want dude.