Answers

The Brainliest Answer!
2016-01-30T20:43:55+05:30
Import java.util.Scanner;
class assa
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter first value");
int a=sc.nextInt();
System.out.println("Enter second value");
int b=sc.nextInt();
System.out.println("Enter operator");
char c=sc.next().charAt(0);
int s;
if(c=='+')
{
s=a+b;
}
else if(c=='-')
{
s=a-b;
}
else if(c=='*')
{
s=a*b;
}
else if(c=='/')
{
s=a/b;
}
else
{
System.out.println("Invalid input");
}
System.out.println("Ans = "+s);
}
}
2 3 2