From 1061f922e5e0eedaa51e2c774055b65c3394723b Mon Sep 17 00:00:00 2001 From: aarush2410 <76821730+aarush2410@users.noreply.github.com> Date: Mon, 4 Oct 2021 18:05:32 +0530 Subject: [PATCH 1/2] left triangle --- left triangle.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 left triangle.java diff --git a/left triangle.java b/left triangle.java new file mode 100644 index 0000000..7c78719 --- /dev/null +++ b/left triangle.java @@ -0,0 +1,21 @@ + public class RightTrianglePattern + { + public static void main(String args[]) + { + //i for rows and j for columns + //row denotes the number of rows you want to print + int i, j, row=6; + //outer loop for rows + for(i=0; i Date: Mon, 4 Oct 2021 18:07:13 +0530 Subject: [PATCH 2/2] ascii --- ascii.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ascii.java diff --git a/ascii.java b/ascii.java new file mode 100644 index 0000000..e019e7c --- /dev/null +++ b/ascii.java @@ -0,0 +1,14 @@ + public class PrintAsciiValueExample1 + { + public static void main(String[] args) + { + // character whose ASCII value to be found + char ch1 = 'a'; + char ch2 = 'b'; + // variable that stores the integer value of the character + int asciivalue1 = ch1; + int asciivalue2 = ch2; + System.out.println("The ASCII value of " + ch1 + " is: " + asciivalue1); + System.out.println("The ASCII value of " + ch2 + " is: " + asciivalue2); + } + }