You are on page 1of 4

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package inputdata;

import java.util.Scanner;

/**

* @author Student

*/

public class Inputdata {

Inputdata()

{System.out.println("sawsan");

public void give()

System.out.println("hello");

// return 5;

public void menue()

System.out.println("ENTER YOUR OPTION ");

System.out.println("1 : + ");

System.out.println("2 : - ");
System.out.println("3 : * ");

System.out.println("4 : / ");

System.out.println("ENTER YOUR OPTION ");

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

// TODO code application logic here

Scanner cin=new Scanner(System.in);

Inputdata n=new Inputdata();

Inputdata n2=new Inputdata();

n.give();

int x,y;

x=cin.nextInt();

y=cin.nextInt();

int sum=x+y;

if(x>=y)

System.out.println("max is " + x);

else

System.out.println("max is " +y);

/////////////////////////////////////////

n.menue();

n2.menue();

int op,z;

op=cin.nextInt();

if(op==1)
{z=x+y;

System.out.println("sum = "+ (x+y));}

else if(op==2)

System.out.println("sub = " + (x-y));

else if(op==3)

System.out.println("multiply = " + (x*y));

else if(op==4)

System.out.println("division = " + (x/y));

else

System.out.println("invalid option");

You might also like