Computer Science, asked by umraoseemachikku, 7 months ago


1.
Write a program in Java to assign three integers and print their sum and product.

Answers

Answered by kumawatkhushwant
6

Answer:

hope it is helpful mark as brainleist

Attachments:
Answered by mansa12330
1

Answer:

import java.util.Scanner;

public class Operators {

public static void main(String[] args)

{

Scanner in = new Scanner(System.in);

System.out.print("Input 1st integer: ");

int firstInt = in.nextInt();

System.out.print("Input 2nd integer: ");

int secondInt = in.nextInt();

System.out.print("Input 3rd integer: ");

int thirdInt = in.nextInt();

System.out.printf("Sum of two integers: %d%n", firstInt + secondInt+thirdInt);

System.out.printf("Product of two integers: %d%n", firstInt * secondInt*thirdint);

}

}

Similar questions