Home > Back-end >  C, c2059: syntax error '<' how to solve, can compile and run wrong
C, c2059: syntax error '<' how to solve, can compile and run wrong

Time:09-17

#include

Void main ()

{
Char c;
Printf (" input a character ");
C=getchar ();
If (c<32)
{
Printf (" this is a control character \ n ");
}
Else if (c>='0' & amp; & C<='9')
{printf (" this is a digit \ n "); }
Else if (c>='A' & amp; & C<='Z')
{printf (" this is a capital letter \ n "); }
Else if (c>='a' & amp; & C<='z')
{printf (" this is a small letter \ n "); }
The else
{printf (" this is an other character \ n "); }
}

CodePudding user response:

Which bosses, have time to help go through self-study c, look for a long time not solve

CodePudding user response:

Int main ()//don't use void

CodePudding user response:

reference 1/f, onion response:
which bosses, have time to help go through self-study c, look for a long time not solve

Screenshots out look

CodePudding user response:

 # include & lt; Stdio. H> 

Void main ()
{
Char c;
Printf (" input a character ");
C=getchar ();
If (c<32)
{
Printf (" this is a control character \ n ");
}
Else if (c>='0' & amp; & C<='9')
{
Printf (" this is a digit \ n ");
}
Else if (c>='A' & amp; & C<='Z')
{
Printf (" this is a capital letter \ n ");
}
Else if (c>='a' & amp; & C<='z')
{
Printf (" this is a small letter \ n ");
}
The else
{
Printf (" this is an other character \ n ");
}
}

Code compilation sure,


Running is no problem, it is recommended that the original poster look for other reasons