Program 2, How long will that take?

Short Description:

Write a program which will estimate the time required to crack a password using brute force.

This assignment is worth 50 points.

Goals

When you finish this homework, you should have:

Formal Description

Write a program which will estimate the amount of time required to crack a password. Your program should begin by prompting the user for data related to the password: Assume that password rules require you to use unique letters in a password. For example, if the user tells you that they have three letters in their password, then this password is composed of three distinct letters. This is called a permutation, and can be calculated using the formula n!/(n-r)!, where n is the number of letters in the alphabet and r is the number of letters in the password. You might look at problem 3 on page 132 for computing n!.

You should report to the user

Remember, your output must be organized, well labeled and easy to read.

Discussion

Be careful of your input, it will be easy to overflow an int with this program. Perhaps you might want to use something larger than an int for some of your computations.

Your identifiers should be constructed properly, with meaningful names.

You should document your code with comments.

Your output should be organized, easy to read, and make appropriate use of white space.

Design

See homework number 7.

Required Files

A single source code file.

Submission

Email your final source code file to danbennett360@gmail.com.