//Check character is special symbol or not
import java.util.Scanner;
public class Spcl_Symbol {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a character:");
char x=sc.next().charAt(0);
if(x>=32 && x<=47)
System.out.println("It is a Special Symbol.");
else
System.out.println("It is not a Special Symbol.");
}
}
import java.util.Scanner;
public class Spcl_Symbol {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter a character:");
char x=sc.next().charAt(0);
if(x>=32 && x<=47)
System.out.println("It is a Special Symbol.");
else
System.out.println("It is not a Special Symbol.");
}
}
No comments:
Post a Comment