So I got the first function, is digit to work, but not the others. I'm confused because I used them the same way but obviously, that is incorrect. The other function I want to output like islower('entered letter') = 0. I've tried looking it up but don't see anything that applies to what I'm trying to do. Any recommendations for sites I could look at? Or any reconnections on how I should edit the code? Thanks.
#include "stdafx.h"
#include <stdio.h>
#include <ctype.h>
#include <cctype>
#include <cstring>
int main()
{
int c;
printf("Enter the character: ");
c = getchar();
if (isdigit(c) == 0)
{
printf
("User has entered the chacter: %c\n\n", c);
}
if (iscntrl(c) == 0)
{
printf("User has entered the character = %c\n", c);
}
if (islower(c) == 0)
{
printf("User has entered the character = %c\n", c);
}
if (isupper(c) == 0)
{
printf("User has entered the character: %c\n", c);
}
return 0;
}