Java Tutorial EP4 - Calculator with User Input!
Channel:
Subscribers:
65
Published on ● Video Link: https://www.youtube.com/watch?v=cYPpq8MeOPI
I show you how to implement Scanner listeners! Now you can input your own numbers to use.
If your too lazy to type this out, here's the code:
import java.util.*;
public class InputCalculator {
public static void main(String[] args) {
System.out.println("Enter your first number to add: ");
Scanner scan = new Scanner(System.in);
int num1 = scan.nextInt();
System.out.println("Enter your second number: ");
int num2 = scan.nextInt();
int num3 = num1 + num2;
System.out.println("Your answer is: " + num3);
}
}
Other Videos By RedResonant
2016-10-11 | Minecraft Shaders |
2016-09-21 | Call of Duty: World at War Zombies - Verrückt |
2016-08-26 | FTB Infinity |
2016-06-28 | RedCraft Server Trailer |
2016-06-27 | Call of Duty: World at War Zombies [Nacht der Untoten] |
2016-06-25 | Mari0 |
2016-01-16 | Messing around on I-Survival |
2015-07-21 | Minecraft How-To - Old Tnt! |
2015-07-13 | Java Tutorial EP6 - Compiling Programs! |
2015-06-29 | Java Tutorial EP5 - JFrame! |
2015-06-29 | Java Tutorial EP4 - Calculator with User Input! |
2015-06-27 | Java Tutorial EP3 - Triangular Area Calculator! |
2015-06-27 | Java Tutorial EP2 - Simple Calculator! |
2015-06-27 | Java Tutorial EP1 - Hello World! |
2015-06-04 | Mari0 - EP1 |
2015-06-03 | How to Install mods for Call of Duty WaW! |
2015-05-14 | Adventure - Update 1 |
2015-04-13 | Minecraft Alpha 1.2.6 Server! |
2015-04-01 | Minecraft April Fools Joke! 2015 |
2015-03-13 | The Binding of Issac EP2 |
2015-03-11 | How to kill Herobrine |
Tags:
Java (Programming Language)
Computer
Tutorial
Windows
Maker
Desktop
Input/output
Calculator (Invention)
Programming Language (Software Genre)
ARGaming
Software (album)
Java (Software)
Basic
Visual
Computers
Install
Linux
Linux Kernel (Software)
Ubuntu
Help
Using
System
Screen
Technology
Rpg
Howto