Riwi Number

 


import java.util.*;

class riwi

{

    public static void main(String[]args)

    {

        Scanner sc=new Scanner(System.in);

        System.out.println("Enter a number::");

        int n=sc.nextInt();

        int ll,l,f;

        ll=n%100;

        l=ll/10;

        f=n%10;

        if(l==f)

        System.out.println("Riwi no.");

        else

        System.out.println("Not Riwi No.");

    }

}

Second largest number in java using ternary operator

 //Largest second number using ternary operator public class Main { public static void main(String[] args) { int a=5,b=6,c=7; int ...