Computer Science, asked by aditisuryavanshi28, 8 months ago

write a program in Java to subtract two integer number by using scanner class​

Answers

Answered by BRAINhunter2020
1

hope it helps ☺

please mark brainliest answer...

Attachments:
Answered by kaurmanveer
1

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    Scanner sc =new Scanner(System.in);

    System.out.println("enter the first integer");

    int a= sc.nextInt();

    System.out.println("enter the second integer");

    int b= sc.nextInt();

    int c= a-b;

    System.out.println("subtract of two integer is    "+c);

}

}

Explanation:

Similar questions