#include <stdio.h>
#include <stdlib.h>
#include "Info.h"
#include <ctype.h>
#include <string.h>
#include <math.h>

int main()
{
    char password[32];
    char temp;
    int isuppercase = 0;
    int isnumber = 0;
    int isdollar = 0;
    int counter;

    printf("Please enter your password. It must contain at least one upper case letter, one number, $ sign and be no longer than 32 characters in total\n");
    scanf( " %s", password);

    for (counter = 0; counter <=32; counter++) {
        temp = password[counter];
        if (isupper(temp)) {
            isuppercase = 1;
        }
        if (isdigit(temp)) {
            isnumber = 1;
        }
        if (temp == '$') {
            isdollar = 1;
        }
    }
    if (isuppercase == 1 && isnumber == 1 && isdollar == 1) {
        printf("Password correct!");
    }
    else {
        printf("Password incorrect!");
    }


    return 0;
}