Last updated on:May 26th, 2018,

CPP program to check that the entered character is small, capital or a special character

C++/CPP program to check that the entered character is small, capital or a special character?

Logic of the program

If in the program, Ascii_value_Variable>=97 && Ascii_value_Variable<=122, then the character is small.

If in the program, Ascii_value_Variable>=65 && Ascii_value_Variable<=90, then the character is capital.

If in the program, Ascii_value_Variable>=0 && Ascii_value_Variable>=47 || Ascii_value_Variable>=54 && Ascii_value_Variable<=64 || Ascii_value_Variable>=91 && Ascii_value_Variable<=96 || Ascii_value_Variable>=123 && Ascii_value_Variable<=127,then the character is a special character.

If in the program, Ascii_value_Variable>=47 && Ascii_value_Variable<=57,then it means that you have entered a digit.

Program

.

0Shares

Leave a Reply

Your email address will not be published.