Canna

Saturday, 29 September 2018

COUTNTALPHA

  • Problem Description

    Kevin and marhov play the words game.the game is identify the alphabet and numbers in a slide show.
  • Test Case 1

    Input (stdin)
    2
    
    
    Expected Output
    Not an alphabet
  • Test Case 2

    Input (stdin)
    Q
    
    
    Expected Output
    an alphabet
  • Program
  • #include <stdio.h>
    #include <string.h>
    int main()
    {
      char c;
      scanf("%c",&c);
      if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
      {
        printf("an alphabet");
        }
      else
        {
        printf("Not an alphabet");
    }
     return 0;
    }

No comments:

Post a Comment

Note: only a member of this blog may post a comment.