blob: 52d44fbcd06a565c756403fd86badb1628174c6c (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Example 4.3
// A program that reads a character from the keyboard and then print in reverse
//case ,that is,if input is in upper case,the output will be lower case and vice-versa
disp("Enter an alphabet");
alphabet=scanf("%c"); //Reading character
if((ascii(alphabet))>=97) then
disp(convstr(alphabet,"u")); //Reverse and display
else
disp(convstr(alphabet,"l")); //Reverse and display
end
|