WAP to enter a alphabet and if that alphabet matches first character of your name display your name.
Share
WAP to enter a alphabet and if that alphabet matches first character of your name display your name.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
import java. util. Scanner;
public class Abc{
public static void main(String args[]){
Scanner scn = new Scanner(System.in);
System.out.print("Enter a alphabet : ");
char c = scn.next().charAt(0);
if(c=='k'||c=='K')
System.out.println("Kareetika");
scn.close();
}
}
Note : I'm using K and Kreetika because it's your username.
.
.
.
.
HOPE THIS HELPS YOU
.
.
.
.
PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO