summary refs log tree commit diff stats
path: root/java/output
diff options
context:
space:
mode:
authorSudipto Mallick <smlckz@bccr>2024-01-10 13:53:54 +0530
committerSudipto Mallick <smlckz@bccr>2024-01-10 13:53:54 +0530
commit5ea0ab6272277357c847ce324582e08cff58d134 (patch)
tree870571d13f1fb6f0135463e1d1d71e05dbd0c641 /java/output
parenta914804458e9697f1a9e0430c72ffe941582bbf5 (diff)
downloadzadania-5ea0ab6272277357c847ce324582e08cff58d134.tar.gz
Incorporate changes to Java assignment #5
Updating assignment as directed
Diffstat (limited to 'java/output')
-rw-r--r--java/output/AddTwoNumbers.typ25
1 files changed, 2 insertions, 23 deletions
diff --git a/java/output/AddTwoNumbers.typ b/java/output/AddTwoNumbers.typ
index 0d3da48..c7102f4 100644
--- a/java/output/AddTwoNumbers.typ
+++ b/java/output/AddTwoNumbers.typ
@@ -1,35 +1,14 @@
 #import "/template.typ": highlight-output
-==== Taking input from command line arguments
 #highlight-output[```
-$ java AddTwoNumbersCLI 
-Usage: AddTwoNumbersCLI first-number second-number
-$ java  AddTwoNumbersCLI 5 7
+$ java AddTwoNumbersCLI 5 7
 Taking input from CLI arguments:
 5.0 + 7.0 = 12.0
-```]
-==== Taking input using `java.util.Scanner`
-#highlight-output[```
-$ java AddTwoNumbersScan
 Taking input using java.util.Scanner:
-Enter first number: 12
+Enter first number: 12 
 Enter second number: 7.3
 12.0 + 7.3 = 19.3
-$ java AddTwoNumbersScan
-Taking input using java.util.Scanner:
-Enter first number: 5.1
-Enter second number: 2c
-Invalid numbers
-```]
-==== Taking input using `java.io.BufferedReader`
-#highlight-output[```
-$ java AddTwoNumbersBuf
 Taking input using java.io.BufferedReader:
 Enter first number: 11.1
 Enter second number: 9.6
 11.1 + 9.6 = 20.7
-$ java AddTwoNumbersBuf
-Taking input using java.io.BufferedReader:
-Enter first number: 78
-Enter second number: ab
-Invalid numbers
 ```]