In the main method, declare two int variables a and b.
Assign them any values.
Display their sum and product on the screen.
Display each value on a new line.
Example output for a = 5, b = 7: 12
35
Requirements:
The program should display text on the screen.
The program should have two int variables a and b.
The variables must be immediately assigned values.
The main method should display the sum of the variables a and b.
The main method should display the product of the variables a and b.
Each value should be displayed on a new line.
package com.codegym.task.task02.task0207;
/*
Part of a calculator
*/
public class Solution {
public static void main(String[] args) {
//write your code here
}
}
We can't look at your task nor your code. For some reason there are no buttons "Condition"/Code" , so I don't know what your task and your problem is. Could you fix that, please?