Computer Science, asked by sunilasingh802, 7 months ago

2 22. Write a program to define a method void change(), to initialize a character in lowercase form
and convert into its opposite case. Print the original character and the new character.

Answers

Answered by Abhinab08
7

Answer:

if u find useful apreciate (•‿•)

Explanation:

/* Java Program Example - Convert Lowercase Character to Uppercase */

import java.util.Scanner;

public class JavaProgram

{

public static void main(String[] input)

{

char ch;

int temp;

Scanner scan = new Scanner(System.in);

System.out.print("Enter a Character in Lowercase : ");

ch = scan.next().charAt(0);

temp = (int) ch;

temp = temp - 32;

ch = (char) temp;

System.out.print("Equivalent Character in Uppercase = " +ch);

}

}

u need c++ or java or phython

plz tell I will change it ..

Similar questions