From b47513a6f3b2dd6555bea72cd7141efb37f728ad Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 30 Aug 2020 11:16:41 +0300 Subject: [PATCH] ShowMyInfo program --- .gitignore | 1 + lab-0/.idea/.gitignore | 3 +++ lab-0/.idea/misc.xml | 6 ++++++ lab-0/.idea/modules.xml | 8 ++++++++ lab-0/.idea/vcs.xml | 6 ++++++ lab-0/ShowMyInfo-output.txt | 7 +++++++ lab-0/lab-0.iml | 11 +++++++++++ lab-0/src/ShowMyInfo.java | 14 ++++++++++++++ 8 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 lab-0/.idea/.gitignore create mode 100644 lab-0/.idea/misc.xml create mode 100644 lab-0/.idea/modules.xml create mode 100644 lab-0/.idea/vcs.xml create mode 100644 lab-0/ShowMyInfo-output.txt create mode 100644 lab-0/lab-0.iml create mode 100644 lab-0/src/ShowMyInfo.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b468b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.class diff --git a/lab-0/.idea/.gitignore b/lab-0/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/lab-0/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/lab-0/.idea/misc.xml b/lab-0/.idea/misc.xml new file mode 100644 index 0000000..e0844bc --- /dev/null +++ b/lab-0/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lab-0/.idea/modules.xml b/lab-0/.idea/modules.xml new file mode 100644 index 0000000..7dd05bd --- /dev/null +++ b/lab-0/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/lab-0/.idea/vcs.xml b/lab-0/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/lab-0/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lab-0/ShowMyInfo-output.txt b/lab-0/ShowMyInfo-output.txt new file mode 100644 index 0000000..ba5a75a --- /dev/null +++ b/lab-0/ShowMyInfo-output.txt @@ -0,0 +1,7 @@ +/usr/lib/jvm/java-11-openjdk/bin/java -javaagent:/usr/share/idea/lib/idea_rt.jar=45631:/usr/share/idea/bin -Dfile.encoding=UTF-8 -classpath /home/hesham/Dev/EE364-lab/lab-0/out/production/lab-0 ShowMyInfo +Enter your name: Hesham +Enter your age: 23 +Welcome Hesham, your age is 23 + +Process finished with exit code 0 + diff --git a/lab-0/lab-0.iml b/lab-0/lab-0.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/lab-0/lab-0.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/lab-0/src/ShowMyInfo.java b/lab-0/src/ShowMyInfo.java new file mode 100644 index 0000000..5fa4bae --- /dev/null +++ b/lab-0/src/ShowMyInfo.java @@ -0,0 +1,14 @@ +import java.util.Scanner; + +public class ShowMyInfo { + public static void main(String args[]){ + Scanner input = new Scanner(System.in); + String name; + int age; + System.out.print("Enter your name: "); + name = input.nextLine(); + System.out.print("Enter your age: "); + age = input.nextInt(); + System.out.println("Welcome "+ name + ", your age is " + age); + } +}