CrazyEngineers
  • Take input from the user and then check whether it is a number or a character. if it is a character, determine whether it is in upper case or lower case. Also print its ASCII value.

    hari tiger

    Member

    Updated: Oct 26, 2024
    Views: 1.2K

    Please help me in solving this progam using c language

    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorDec 25, 2018

    Have you attempted it on your own yet? Please paste your attempt so that we can help you fix it. ? 

    Are you sure? This action cannot be undone.
    Cancel
  • Sagar Paranjpe

    MemberDec 25, 2018

    //------------------ 
    #include <ctype.h>
    ...
    ....
    if(isalpha($input) {
     // The input is a 'character'
     if(isupper(
        // The input is upper
       ...
       .....
    }
    
    if(isdigit($input) {
     // The input is a number
    }
    //------------------         

    Does this help? You need to expand this logic. ? 

    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register