Lower Case to Uppre Case Conversion
//PROGRAM FOR PRINTING CHARACTER IN UPPER CASE GIVEN THE CHARACTER IN LOWER CASE
//AUTHOR:SIVAPHANINDRA.VEMURI
import java.io.*; /*IMPORTING THE EXISTING CLASSES*/
class Task1d /*CLASS NAMED Task1d*/
{
public static void main(String[] args)throws IOException /*MAIN FUNCTION WHICH
THROWS AN IOEXCEPTION IF SATISFIES THE CONDITION*/
{
char c; //FOR STORING THE READ CHARCATER FROM THE USER
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));/*BUFFERED READER FOR TAKING THE INPUT FROM THE USER*/
System.out.println("Enter Character To Quit Press 'q'");
do
{
c=(char)br.read(); /*READ FUNCTION TO READ CHARACTER WITH "br" AS AN OBJECT OF BEFFEREDREADER*/
if(c==10||c==13) /*TO ELIMINATE THE SPACE AND ENTER UNNECESSARY CHARACTERS*/
{}
else if(c=='q')
return;
else
System.out.println("UPPER CASE IS:"+(char)(c-32)); /*CONVERTING THE GIVEN CHARACTER INTO UPPER CASE*/
}while(c!='q'); /*REPEAT UNTIL GIVEN CHARACTER IS NOT EQUAL TO 'q'*/
}
}
//AUTHOR:SIVAPHANINDRA.VEMURI
import java.io.*; /*IMPORTING THE EXISTING CLASSES*/
class Task1d /*CLASS NAMED Task1d*/
{
public static void main(String[] args)throws IOException /*MAIN FUNCTION WHICH
THROWS AN IOEXCEPTION IF SATISFIES THE CONDITION*/
{
char c; //FOR STORING THE READ CHARCATER FROM THE USER
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));/*BUFFERED READER FOR TAKING THE INPUT FROM THE USER*/
System.out.println("Enter Character To Quit Press 'q'");
do
{
c=(char)br.read(); /*READ FUNCTION TO READ CHARACTER WITH "br" AS AN OBJECT OF BEFFEREDREADER*/
if(c==10||c==13) /*TO ELIMINATE THE SPACE AND ENTER UNNECESSARY CHARACTERS*/
{}
else if(c=='q')
return;
else
System.out.println("UPPER CASE IS:"+(char)(c-32)); /*CONVERTING THE GIVEN CHARACTER INTO UPPER CASE*/
}while(c!='q'); /*REPEAT UNTIL GIVEN CHARACTER IS NOT EQUAL TO 'q'*/
}
}