27 Mart 2017 Pazartesi

QT IS CAPITAL IS DIGITAL IS SMALL CHARACTER

#include "iscapital_isdigit_issmall.h"
#include
IsCapital_IsDigit_IsSmall::IsCapital_IsDigit_IsSmall()
{

    char character;
    std::cout << " Enter A Character : ";
    std::cin>>character;


    int storeAscii = character;


    std::cout << "The Ascii Value of   :    "<< character << "        is          "<< storeAscii ;


    if (storeAscii>=65 && storeAscii<=90)
      {
        std::cout<<"\nYou have entered a capital letter";
      }

      else if (storeAscii>=97 && storeAscii<=122)
      {
        std::cout<<"\nYou have entered a small letter";
      }

      else if (storeAscii>=47 && storeAscii<=57)
      {
        std::cout<<"\nYou have entered a digit ";
      }

      else if (storeAscii>=0 && storeAscii>=47
          || storeAscii>=54 && storeAscii<=64
          || storeAscii>=91 && storeAscii<=96
          || storeAscii>=123 && storeAscii<=127)
      {
        std::cout<<"\nYou have entered a special character";
      }


}


Share: