whether the character Entered through the keyboard is a lower case alphabet or not

 whether the character Entered  through the keyboard is a lower case alphabet or not

 #include<stdio.h>

int main()

{

char ch;

//Input character from user 

printf("Enter any character:");

scanf("%c",&ch);

if(ch>='A'&&ch<='Z')

{

printf("%c is Uppercase alphabet.",ch);

}

else if(ch>='a'&&ch<='z)

{

printf("%c is lowercase alphabet",ch);

 }

else

printf("%c is not alphabet",ch);

}

return 0;

} .

output

Enter any character:U

 is Uppercase alphabet.


related example--

1.. A digital world colors are specified in Red ,Green ,Blue(RGB) format with value of (R,G,B) varying on integers scale from 0 to 255 in point publishing the colors are mentioned in cyan, magenta - yellow black (CMYK) format ,with value of C,M,Y and k varying on real scale from 0.0 to 1.0 write the program to convert RGB colors to CMYK as per the following formula.. White=max(Red/255,Green/255,Blue/255), cyan=(white-Red/255)/white Magenta=(white -Green/255)/white black = 1-white. note that if RGB value are all 0 then the cmy values are all 0 and the k value is 1.

2..if the three of triangle are entered through the keyboard write a program to check whether the triangle is isosceles equilateral ,scalene or right angle triangle 

3..The body mas index (BMI) is defined as ratio of the weight of the person (in kilometer) to the square oef height (in meters) . write a program that receive weight and height calculate the BMI and report the BMI category as per the following table . BMI category BMI Starvation <15 Anorexic 15.1 to 17.5 Under weight 17.6 to 18.5 Ideal 18.6 to 24.9 Over weight 25 to 25.8 Obese 30 to 30.9 Morbidly obese >=40

4..A certain grade of steel is graded according to following condition: (i) Hardness must be greater than 50. (ii)carbon content must be less than 0.7 (iii)Tensile strength must be greater than 5600. the grades as follows: grade is 10 if all three condition are met, Gradeis 9 if conditions (i)and (ii) are met , Grade is 8 if condition (ii) and (iii) are met , Grade is 7 if condition (i) and (iii) are met, Grade is 6 if only one condition is met , Grade is 5 if none of the conditions are met . write a program which will require the user to give values of hardness , carbon content and tensile stength of the steel under consideration and output the grade of steel 

Comments

Popular posts from this blog

if the marks obtain by a student in five different subjects are input through the keyboard write a program to find out the aggregate marks and percentage marks obtained by the student. assume that the maximum marks that can be obtained by a student in each subject is 100.

If lengths of three sides of a tringle are input through the keyboard write a program to find the area of tringle.

the length and breadth of a rectangle and radius of a circle are input through the keyboard. write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle