Write a java program and draw the data/variable description table to find the difference between 2 numbers using variables.
Answers
Answered by
1
Answer:
import java.util.*;
public class average
{
public static void main (String args[ ])
{
Scanner sc = new Scanner(System.in);
int a, b, c;
System.out.println("Enter two numbers:");
a= sc.nextInt( );
b= sc.nextInt( );
c= a-b;
System.out.println("difference of two numbers ="+c);
}
}
- variable name- a
data type- int
description- to store 1st number
2. variable name- b
data type- int
description- to store 2nd number
3. variable name- c
data type- int
description- to store the result
Mark as brainliest
Similar questions