From f82356c02002fcb184f1e1d6ace68705c21cf002 Mon Sep 17 00:00:00 2001 From: k0rrluna Date: Mon, 7 Oct 2024 19:09:36 +0300 Subject: [PATCH] first commit --- exercise2/first.class | Bin 0 -> 1447 bytes exercise2/first.java | 26 ++++++++++++++++++++++++++ helloworld.class | Bin 0 -> 1107 bytes helloworld.java | 12 ++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 exercise2/first.class create mode 100644 exercise2/first.java create mode 100644 helloworld.class create mode 100644 helloworld.java diff --git a/exercise2/first.class b/exercise2/first.class new file mode 100644 index 0000000000000000000000000000000000000000..e8c48336661c2f01a456e8ec6f10bea1c6d7cd58 GIT binary patch literal 1447 zcmaJ>-Ez}L6#h1eEkzYEF(E%dsL}?oLK_p30?iME*rb>S60iv{o$1WR-Xx3Vl}B0w zxo#h#uTd^wCY|X6^t#W}=~>C4W}K-mbk3gr_Uw0l_WbqF@t*+J@Y2Bm1}zM^$RNvb z_BDUQivd>$#qGV6&oWAPEEwxD|5}49h}9eg}jS%7-Kkh${7Z$Z9D{uoEB2A2|aQt)xnCt zYh#=t!{@!FMH`b0Lwobyf{hDgtdsV=jZ369NL{pWnPD`!rK4p~tk$_wA~HdFE@to* z!+{b{yJMEQzjy;yo4%Uv^;uLsql&)UwBHJY~3HAe`Qo*-uMMTaK}|MI>9o zv|;ZSgIh5zUkZ2}i`YVq;Ywe!PRoG>s>XrcdoT1}H= zBr|g#!G0%&VT1l=+dzj=LYZ^}{Tmk9fnVRl%AfgwoRR0da-u7zy7D5)KQR63J-+;i zua`3hdzEZcnGYzen$53|1rIb z9C5N}V%RjihA{~T9u30+&R_{6gwIh#qtuRh>|hK(V;uXKKtRY}Foi)pNFv?D4}z|_AT8eXgb literal 0 HcmV?d00001 diff --git a/exercise2/first.java b/exercise2/first.java new file mode 100644 index 0000000..941373d --- /dev/null +++ b/exercise2/first.java @@ -0,0 +1,26 @@ +import java.util.Scanner; +public class first{ + public static void main(String[] args) { + int test1; + int test2; + double radius; + System.out.println("Test Data:"); + System.out.println("a. "+(-5 + 8 * 6)); + System.out.println("b. "+ ((55+9) % 9)); + System.out.println("c. "+ (20 + -3*5 / 8)); + System.out.println("d. "+ (5 + 15 / 3 * 2 - 8 % 3)); + + Scanner scan = new Scanner(System.in); + System.out.println("Enter integer 1"); + test1 = scan.nextInt(); + + System.out.println("Enter integer 2"); + test2 = scan.nextInt(); + + System.out.println("The PRODUCT of two integer: "+ (test1*test2)); + + System.out.println("Enter radius of a circle! (pi taken as 3!)"); + radius = scan.nextDouble(); + System.out.println("The area of circle: "+(3*radius*radius)+"\nThe perimeter of circle: "+(2*3*radius)); + } +} \ No newline at end of file diff --git a/helloworld.class b/helloworld.class new file mode 100644 index 0000000000000000000000000000000000000000..3c6e4f1c0ca5c024feadc9c0e5a5b0fd5d9042a6 GIT binary patch literal 1107 zcmaJ=>rN9v6#j-5wp|v>{i1@ca%ll6;@tv9n-WM08ru|!e;nEgENo|*-6_hO_!{y9 z5=?vmAIf;9g;3JQO?KwYnQy-HoilU({Js1QU=43=bRlFR?4TPx4E;y^gr_|&57Hm@ zk3?BB^sKtl)$0tQWU6E#!Z6SP)wS!T3uP{)@T0KNYr%2QhdZ}e3a5bPCHoybCl4g@I18` z-&MX>NmxiR*oVgT%{UmsSydr5F(YcHUfmadk?(ut30Ju({Alt^J9DZ;ECp5f%VNVd z;Mfi2k|`2h;k$Y&^v?3(rl4FBqm9^=#zt$`f@g(#@hZliuKE zt^8AlAFb(L0h^?oTvj|0Oy`w4uGcc{LR&ny4i-;qq654&)#fA4v|iE`MV5PB!PO!Y z!7D28o~p-%)WR1Pn=v?B=2>Sw9t0w=kYSiKScI8B6P7)%u&as$s58_BWfDUG)E}z6Z&7` OHLYy2-e48$nD_?}8W~ss literal 0 HcmV?d00001 diff --git a/helloworld.java b/helloworld.java new file mode 100644 index 0000000..d20b115 --- /dev/null +++ b/helloworld.java @@ -0,0 +1,12 @@ +import java.util.Scanner; +public class helloworld { + public static void main(String[] args) { + String test; + Scanner scan = new Scanner(System.in); + System.out.println("ENTER A TEXT!"); + test = scan.nextLine(); + System.out.println("You entered\n" + test); + int result = 50; + System.out.println("Hello, World!"); + } +}