Computer Science, asked by punjabineel79, 2 months ago

wap to input a two digit number and find the sum and product the display the sum​ and the product

Answers

Answered by KnowledgeTalk11
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