//Returning a value:
#include"stdio.h"
#include"conio.h"
//Decliration
void small(char&);
void cap(char&);
char ch1,ch2;
void main()
{
printf("Press any Alphabet\n");
ch1=getche();
small(ch1);
printf("\nSmall alphabet is %c\n",ch1);
printf("\n\n");
printf("Press any Alphabet\n");
ch2=getche();
cap(ch2);
printf("\nCapital alphabet is %c",ch2);
getch();
}
//Defination
void small(char &x)
{
if(x>=65&&x<=90)
x=x+32;
}
//Defination
void cap(char &x)
{
if(x>=97&&x<=132)
x=x-32;
}
Home
code to convert small alphabets to large or large to small
code to convert small alphabets to large or large to small
0 comments: