Wednesday, 13 December 2017

11D-prg-17 Write a algorith and program whether a given character is an alphabet, digit or any other character.using function


Algorithm:

Input:
1. ch  //character

Output:
1. al/dig/spec

Method:
1. start
2. Read ch
3. Print ch
4. //logic

  if(isalpha(ch))
   Print " The character is an alphabet "
  else
  if(isdigit(ch))
   print " The character is an digit"
  else
   Print " It is a special character"
5.Stop

No comments:

Post a Comment