wap to input a two digit number and find the sum and product the display the sum and the product
Answers
Answered by
0
Answer:
import java.util.Scanner;
public class Sum
{
public static void main (String args [])
{
Scanner sc = new Scanner ( System.in);
system.out.print(" Enter a two digit integer: ");
n= sc.nextInt ();
int sum = 0;
int product = 1;
sum = sum + n;
product* = n;
system.out.println(" Sum is: " + sum);
system.out.println(" Product is: " + product);
}
}
Similar questions
Biology,
1 month ago
English,
1 month ago
English,
2 months ago
India Languages,
2 months ago
Science,
9 months ago