Tuesday, February 18

Solving Subtraction Issue in Maths Using Java



Hi ALL,

Here I wrote a program for Solving Subtraction Issue in Maths Using java.

/**
 *
 * @author Balamurgan M
 */
import java.util.Scanner;

public class MathExample {
    public static void main(String arg[]){
        System.out.println("Enter the I J value ");
        Scanner in=new Scanner(System.in);
        int i=in.nextInt();
        int j=in.nextInt();
        if(i>j){
            System.out.println(" Please Solve simple subtraction issue ");
        System.out.println(i+"-"+j+"= ?");
        int uans=in.nextInt();
        int ans=i-j;
        if(ans==uans)
            System.out.println(" Answer is corrct" +ans);
        else
            System.out.println(" Answer is Incorrect :-(");
        }else
            System.out.println(" Given value is incorrct");
           
    }
   
}

No comments:

Post a Comment

Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...