programming

posted by .

You are required to design and write an application that will analyze an input file (InputFile.txt); the file contains a date on each line. Your algorithm should output all the missing dates, excluding Saturdays and Sundays. You should not cater for public holidays. Also keep in mind: each leap year (every 4 years) contains an extra date for February 29th. Leap years: 2000, 2004, 2008, …

Your results should also output a date range instead of each individual date; if there is more than one concurrent date missing. For example: if you are missing 2008/02/03, 2008/02/04 and 2008/02/05 you should output 2008/02/03 – 2008/02/05.

Your output should be written to a file (OutputFile.txt).

Example:

If you input was:

2008/01/03
2008/01/04
2008/01/07
2008/01/08
2008/01/09
2008/01/11
2008/01/14
2008/01/18
2008/01/21
2008/01/22
2008/01/24

Your output should be:

2008/01/10
2008/01/15 – 2008/01/17
2008/01/23

  • programming -

    you should probably mention the language its in.

  • Mathematics -

    The length and width of a rectangle are 50cm and 15cm respectively.
    Each measurement is correct to the nearest cm.
    Write down the upper bound of the length?
    And find the least possible perimeter of the rectangle

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Java

    I need to write a Java program using an input file with the below data. I don’t even know where to begin. I have written others but this one has me totally confused. I know how to do it using math WL% = Wins / (Wins + Losses) I also …
  2. Programming and algorithms

    For each of the following problems, use the top-down modular approach and pseudocode to design a suitable program to solve it. 1. Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records …
  3. Unix Script

    "Using "if" statement checks for a file called "student.txt" in the current directory. Removes (deletes) the file if it exist. This file will collect last name, first name, and grade for 5 people. Use a while loop to get the information …
  4. Unix Shell script

    Shell script Using "if" statement checks for a file called "student.txt" in the current directory. Removes (deletes) the file if it exist. This file will collect last name, first name, and grade for 5 people. Use a while loop to get …
  5. programming

    Write a C program to sort the bags by weight. Assume that the input is given in a file. Each line of the input file corresponds to one polythene bag. For example a line in the file as below 10,20,20,10,10,50,10,50 corresponds to a …
  6. C++

    File version maintenance utility   A team of software developers has been asked to develop a file version maintenance utility . The utility should maintain all the  version of a file. When a user modifies a file, the current version …
  7. Programming

    2. Then it should prompt the user for the input file name of the file containing the data to sort. 3. If the program can't open the file or if no file name is entered (^d or ^z is entered for EOF), it should print an error message …
  8. programming logic raptor

    1. a.input names of students from the user, terminated by "zzz", 0,0,0, and create a data file grades with records of the following form: student (string), test1 (integer), test2(integer), test3 (integer) b. display the contents of …
  9. programming

    b. Write a well-commented C++ program that reads data from the input file employee.txt. Each input line consists of last name, first name, base salary, total sales, and number of years of service. Store the output in the file employees_payCheck.txt. …
  10. FL

    • Loops • File processing • Previously mastered course topics Create an application allowing employees to take orders and then tally up the total costs from its customers. The coffee shop offers the following items on its menu: …

More Similar Questions