#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int main()
{
    char passWord[20];

    int i;
    int upperCase = 0;
    int dollarSign = 0;
    int num = 0;

    printf("Enter you password : ");

    scanf(" %s", passWord);

    for (i = 0; i < strlen(passWord); i++) {
        if (isupper(passWord))
            upperCase++;
        if (isdigit(passWord))
            num++;
        if (passWord == '$')
            dollarSign++;
    }

    if (num > 0 && upperCase > 0 && dollarSign > 0)
        printf("\nGood to go!");
    else
        printf("\nYour code sucks!");

    printf("\n\nnum: %i\t dollarSign: %i\t upperCase: %i\n", num, dollarSign, upperCase);



    return 0;
}



this is what i came up with, (only been learning c, less than a week so don't laugh lol).

p.s please be free to comment on how to improve this code.