2a. Write a portion of a computer program (in any language) thatwill generate and print all six lowercase letter passwords. Showyour code.
b. How many passwords does this generate?
Solution
class Solution
{
public static voidmain(String[]args)
{
inta, b, c,d, e, f;
// store the no ofpasswords generated
int count= 0;
// for firstletter
for( a = 97; a <= 122 ;a++ )
{
// for second letter
for( b = 97; b <= 122 ;b++ )
{
// for third letter
for( c = 97; c <= 122 ;c++ )
{
// for fourth letter
for( d = 97; d <= 122 ;d++ )
{
// for fifth letter
for( e = 97; e