import java.io.*;
public class calculator{
public static void main(String[] args) throws Exception{
int x, y;
BufferedReader b = new BufferedReader(new InputStreamReader(System.in)) ;
System.out.println("Enter two numbers for operation:");
x = Integer.parseInt(b.readLine());
y = Integer.parseInt(b.readLine());
System.out.println("1. Add");
System.out.println("2. Subtract");
System.out.println("3. Multiply");
System.out.println("4. Divide");
System.out.println("enter your choice:");
int a= Integer.parseInt(b.readLine());
switch (a){
case 1:
System.out.println("Enter the number one=" + (x+y));
break;
case 2:
System.out.println("Enter the number two=" + (x-y));
break;
case 3:
System.out.println("Enetr the number three="+ (x*y));
break;
case 4:
System.out.println("Enter the number four="+ (x/y));
break;
default:
System.out.println("Invalid Entry!");
}
}
}
The case structure in PHP uses the following syntax: switch($foo){ case 'bar': doSomething(); break; case 'blah': doSomethingElse(); break; default: handleOtherCases(); }
i want a coding of a program of a calculator using graphics in c language??
The answer depends on what functions are built into your calculator. Read the calculator manual.
binary coding system
by using a calculator
By using a calculator.
By using a calculator.
It supports websites made on php but not coding in php. There are workarounds for coding in PHP using Android.
A virtual calculator can be implemented using VHDL. We call it VHDL calculator.
by using this we can write a coding for operating systems
differential Manchester gives better noise immunity.
you cant