Advertisement
StefanTobler

Lesson 5 Activity 2

Sep 11th, 2016
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. /*
  2.  * Lesson 5 Coding Activity Question 2
  3.  *
  4.  * Input four integer values and print the sum of all four values.
  5.  *
  6. */
  7.  
  8. import java.util.Scanner;
  9. import java.lang.Math;
  10.  
  11. class Lesson_5_Activity_Two {
  12.     public static void main(String[] args) {
  13.      
  14.       Scanner scan = new Scanner(System.in);
  15.       int a = scan.nextInt();
  16.       int b = scan.nextInt();
  17.       int c = scan.nextInt();
  18.       int d = scan.nextInt();
  19.      
  20.       System.out.println(a + b + c + d);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement