Computer Science, asked by ashishtomar474, 10 months ago

import java.util.*;
class ashish
{
Scanner sc=new Scanner (System.in);
int a,b,c;
System.out.println("enter 3 numbers");
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
System.out.println((a<b)?(c<b)?b+"greater":c+"greater":(a>b)?(a>c):a+"greater");
}
}​

Answers

Answered by Anonymous
0

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args)

{

Scanner input = new Scanner (System.in);

System.out.print("Input the first number: ");

int num1 = input.nextInt();

System.out.print("Input the second number: ");

int num2 = input.nextInt();

int sum = num1 + num2;

System.out.println();

System.out.println("Sum: "+sum);

}

}

Similar questions