# data[].attributes.body
import java.util.*;

class jadenternary

{

public static void main()

{

System.out.println("Enter Age");

Scanner sc= new Scanner(System.in);

int a= sc.nextInt();

String b=(a>=18)?"Elidgible":"Not elidgible to vote... "+(18-a)+" years to go";

System.out.println(b);

}

}

# data[].attributes.body
import java.util.*;
class ternarytask

{
public static void main()

{
Scanner sc= new Scanner(System.in);
String c;
int x;
System.out.println("Enter your age");
x=sc.nextInt();
int z = 18-x;
c=(x>18)?"Pass":"Not eligible to vote... " + z + " more years to go"; System.out.println(c);

} }

# data[].attributes.body
import java.util.*;

class jadenternary2

{

public static void main()

{

System.out.println("Enter 2 numbers");

Scanner sc = new Scanner(System.in);

Scanner cs = new Scanner(System.in);

float x = sc.nextFloat();

float y = cs.nextFloat();

float c = (x>=y)?x/y:y/x;

System.out.println("O/P: "+c);

}

}

# data[].attributes.body
class ternarytask

{

public static void main()

{

Scanner sc= new Scanner(System.in);
String c;
int x;
System.out.println("Enter your age");
x=sc.nextInt();
int z = 18-x;
c=(x>18)?"Pass":"Not eligible to vote... " + z + " more years to go"; System.out.println(c);
}
}

# data[].attributes.body
Scanner a = new Scanner(System.in);
System.out.println("Please enter your age");
int age = a.nextInt();
System.out.println((age>=18)?"Eligible to Vote":((age==15)?"Not Elgibile to Vote...3 more years to go":"Not eligible to vote"));
System.out.println((age<18)?18-age:" ");

# data[].attributes.body
import java.util.Scanner;

class question1

{

public static void main()

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter your age");

int age = sc.nextInt();

final String ans = age >= 18 ? "Allowed to vote" : "Not allowed to vote ... " + (18 - age) + " years left";

System.out.println(ans);

}

}

# data[].attributes.body
x=(a>18)?"Eligible to vote":"Not eligible to vote... " + s + " more years to go";

# data[].attributes.body
x = sc.nextInt();
System.out.println("Enter a number");
y = sc.nextInt();
a=(x>y)?x/y :y/x ;

# data[].attributes.body
import java.util.*;
class ternarytask

{
public static void main()

{
Scanner sc = new Scanner(System.in); System.out.println("Enter a number");
int x = sc.nextInt(); System.out.println("Enter another number"); int y = sc.nextInt();
int z = (x>=y)?x/y:y/x;
System.out.println(z);

} }

# data[].attributes.body
import java.util.Scanner;

class question2

{

public static void main()

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter the value of x");

int x = sc.nextInt();

System.out.println("Enter the value of y");

int y = sc.nextInt();

final int ans = x > y ? x / y : y / x;

System.out.println(ans);

}

}

# data[].attributes.body
Scanner a = new Scanner(System.in);
double x = a.nextDouble();
double y = a.nextDouble();
System.out.println((x>y)?x/y+" is the result":((y>x)?y/x+" is the result":"Please enter valid input"));

# data[].attributes.body
x=(a>50000)?"The discount is 25%. Discounted Price: " + a*0.75 :"The discount is 15%. Discounted Price: " + a*0.85;
System.out.println(x);
}
}

# data[].attributes.body
Scanner a = new Scanner(System.in);
System.out.println("Please enter your bill amount");
double billamount = a.nextDouble();
double discount;
discount = ((billamount>50000)?0.25*billamount:0.15*billamount);
double finalprice = billamount - discount;
System.out.println("Bill amount = "+billamount);
System.out.println("Discount = "+discount);
System.out.println("Final Discounted Price = "+finalprice);

# data[].attributes.body
import java.util.*; class ternarytask

{
public static void main()

{
Scanner sc = new Scanner(System.in); System.out.println("Enter total bill amount"); int x = sc.nextInt();
double y = (x>50000)?0.25*x:0.15*x; System.out.println(y);

} }

# data[].attributes.body
import java.util.*;
class EXTRAONE

{
public static void main()

{
Scanner sc = new Scanner(System.in); int x = sc.nextInt();
String y = (x%2==0)?"Even":"Odd"; System.out.println(y);

} }

# data[].attributes.body
import java.util.Scanner;

class question3

{

public static void main()

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter the total bill.");

int bill = sc.nextInt();

final double amount = bill > 50000 ? 75.0 / 100.0 * bill : 85.0 / 100.0 * bill;

System.out.println("The total bill is " + amount);

}

}

# data[].attributes.body
Scanner sc = new Scanner(System.in); System.out.println("Enter bill amount");
int a = sc.nextInt();
float b = (a>50000)?0.25*a:0.15*a; System.out.println(b);

# data[].attributes.body
import java.util.*;
class EXTRATWO

{
public static void main()

{
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
String z = (x%y==0)?"divisible":"not divisible"; System.out.println(x + " and " + y + " are " + z);

} }

# data[].attributes.body
x = sc.nextInt();
System.out.println("Enter a number");
y = sc.nextInt();
a=(x>=y)?x/y :y/x ;

# data[].attributes.body
x=(s==0)?a +" is an even number":a+ " is an odd number";

# data[].attributes.body
Scanner sc = new Scanner(System.in); System.out.println("Enter bill amount"); 
int x = sc.nextInt();
double y = (x>50000)?0.25*x:0.15*x; System.out.println(y);

# data[].attributes.body
x=(s==0)? a + " is divisible by " + b: a + " is not divisible by " + b;

# data[].attributes.body
Scanner sc = new Scanner(System.in); int z = sc.nextInt();
String p = (z%2==0)?"it is Even":"it is Odd"; System.out.println(p);

# data[].attributes.body
x= (age>=18)?"You are eligible to vote":"Not eligible to vote. "+ ans+" more years to go." ;
System.out.println(x);

# data[].attributes.body
import java.util.*;
class questiontwo
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number");
int x=sc.nextInt();
System.out.println("Enter another number");
int y=sc.nextInt();
int a= x/y;
int b=y/x;
int operation = (x>=y)? a : b;
System.out.println(operation);
}
}

# data[].attributes.body
import java.util.Scanner;
class question5
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number.");
int x = sc.nextInt();
final String out = x % 2 == 0 ? "Even" : "Odd";
System.out.println("The number is " + out);
}
}

# data[].attributes.body
Scanner a = new Scanner(System.in);
System.out.println("Please type in your number");
int n = a.nextInt();
String message = ((n%2==0)?"Your number "+n+" is an even number":"Your number "+n+" is an odd number");
System.out.println(message);

# data[].attributes.body
a) import java.util.*;
class ternarycodingchallenge1
{
    public static void main ()
    {
        Scanner ed= new Scanner(System.in);
        System.out.println("Enter your age: ");
        int a= ed.nextInt();
        int x= 18-a;
        String c= a>18 ? "Eligible to vote" : "Not eligible to vote, " + x + " years to go";
        System.out.println(c);
    }
}

# data[].attributes.body
import java.util.*;

class ternarycodingchallenge1

{

public static void main ()

{

Scanner ed= new Scanner(System.in);

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

int x= ed.nextInt();

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

int y= ed.nextInt();

int c= x>=y ? x/y : y/x;

System.out.println(c);

}

}

# data[].attributes.body
import java.util.Scanner;
class question6
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the value of a");
int a = sc.nextInt();
System.out.println("Enter the value of b");
int b = sc.nextInt();
final String out = a % b == 0 ? " is divisible by " : " is not divisible by ";
System.out.println(a + out + b);
}
}

# data[].attributes.body
import java.util.*;
class questionfour
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the total bill");
float bill=sc.nextInt();
float x = (bill/100)*25;
float y = (bill/100)*15;
float price=(bill >50000)?x:y;
System.out.println(price);
}
}

# data[].attributes.body
import java.util.*;
class questionfive
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number");
int number=sc.nextInt();
String test=(number%2==0)? "It is an even number" : "It is an odd number" ;
System.out.println(test);
}
}

# data[].attributes.body
Scanner a = new Scanner(System.in);
System.out.println("Please enter your first number");
int n1 = a.nextInt();
System.out.println("Please enter your second number");
int n2 = a.nextInt();
String message = ((n1>n2)?((n1%n2==0)?"Your number "+n1+" is divisible by "+n2:"Your number "+n1+" is not divisible by "+n2):((n2>n1)?"Your number "+n2+" is divisible by "+n1:"Your number "+n2+" is not divisible by "+n1));
System.out.println(message);

# data[].attributes.body
import java.util.*;
class questionsix
{
public static void main()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the first number(dividend)");
int number1 =sc.nextInt();
System.out.println("Enter the second number(divisor)");
int number2=+sc.nextInt();
String test=(number1%number2==0)? number1+" is divisible by "+number2 : number1+" is not divisible by "+number2;
System.out.println(test);
}
}

# data[].attributes.body
import java.util.*;
class ternary{
public static void main(){
Scanner sc=new Scanner(System.in);
System.out.println("Enter age");
int age=sc.nextInt();
String a=(age>=18)?"Eligible to Vote":"Not eligible to vote..."+(18-age)+" more years to go";
System.out.println(a);
}
}

# data[].attributes.body
Ans 1.

import java.util.*;
class Asynchronous
{
public static void main()
{
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
System.out.println(x>=18 ? “eligible to vote” : (18-x) + “ more years to go”)
}
}

# data[].attributes.body
Ans 2.
import java.util.*;
class Asynchronous
{
public static void main()
{
Scanner sc=new Scanner(System.in);
System.out.println(“Please enter two numbers”);
int x=sc.nextInt();
int y=sc.nextInt();
System.out.println(x>=y ? (x/y) : (y/x));
}
}

# data[].attributes.body
import java.util.*;
class  Asynchronous
{
public static void main()
{
Scanner sc=new Scanner(System.in);
System.out.println(“Please enter the amount”);
int amount=sc.nextInt();
int discount;
int price;
discount=(amount>50000 ? (25) : (15));
System.out.println(discount + “% is the discount given to you”);
price= amount * discount/100;
System.out.println(price + “ is the final discounted price”);
}
}

# data[].attributes.body
import java.util.*;
class  Asynchronous
{
public static void main()
{
Scanner sc=new Scanner(System.in);
System.out.println(“Please enter a number”);
int x=sc.nextInt();
System.out.println(x%2==0 ? (x+” is an even number”) : (x+” is an odd number”));
}
}

# data[].attributes.body
import java.util.*;
class Asynchronous
{
public static void main()
{
Scanner sc=new Scanner(System.in);
System.out.println(“Please enter a number”);
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(a%b==0 ? (a+” is divisible by “+b) : (a+” is not divisible by “+b));
}
}