Posted by MindBreaker at 8:38 AM
Read our previous post
Object
1- Small
case into upper case and lower case into lower case
Source code
#include <iostream>
using namespace std;
char
alpha (char);
char
alpha (char b)
{
if(b>64
&& b<91)
{
b=b+32;
}
else if(b>=97 && b<=122)
{
b=b-32;
}
return
(b);
}
void
main(void)
{char b,ans,c,result;
cout<<"Enter alphabet"<<endl;
cin>>b;
ans=alpha(b);
cout<<"Answer is = \n"<<ans<<endl;}
Output
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.