+ 1

How to do real Calculational Operations using SoloLearn compiler? Check my #java code example below and the Output in comments:

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner reader=new Scanner(System.in); int fnum, snum, sum; System.out.println("Enter First Number"); fnum=reader.nextInt(); System.out.println("Enter Secnd Number"); snum=reader.nextInt(); sum=fnum+snum; System.out.println("The Answer is " +sum); _________________________________ When the Pop-Up screen shows, type in the values you want to operate them mathmatically like this in column order: 2 2

8th Jun 2017, 9:08 PM
Bilal Muhammed
Bilal Muhammed - avatar
1 ответ
+ 1
The Output will be like the following: Enter First Number Enter Secnd Number The Answer is 4 You would see the compiler successfully made the Math Operation like a local compiler on PCs. 😍🌷
8th Jun 2017, 9:12 PM
Bilal Muhammed
Bilal Muhammed - avatar