Thursday, June 18, 2020

WAP to check if the input character is lowercase alphabet or not.

                                                                                                               
#include<stdio.h>                                                                             {ascii value of a-z is 97 - 122}
int main()
{
 char alive;
 int ascii;
 printf("enter number");
 scanf("%c",&alive);
 ascii=alive;
 if(ascii>=97 && ascii<=122){
     printf("lowercase");
 }
 else{
     printf("not");
    }
 return 0;
}

No comments:

Post a Comment

pattern

55555 4444 333 22 1 #include <stdio.h> int main() {     int i,j;     for(i=5; i>=1; i--)     {         for(j=1; j<=i;...