From 5e7e9a5815e30d932cc1e5e89c97342f052e5068 Mon Sep 17 00:00:00 2001 From: Sage Burger Date: Tue, 15 Aug 2023 19:18:51 +0200 Subject: [PATCH] Randomized the number --- bin/App.class | Bin 562 -> 1588 bytes src/App.java | 34 ++++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/bin/App.class b/bin/App.class index baa6c6726ecc7ff0468f1be52445c21d3cbd1d3d..841e87a4445911ba307a11f6353d1c390a0ffcce 100644 GIT binary patch literal 1588 zcmaJ>ZBrXn6n-w`WrXB^de^#OXLXT$0;l%Vsz3-XNLr zqy7i~hJI*gaK<0tFY!loIzF2X(=cTGa?d^YocrA8Jm>8G^ZMj(0C%yQ#)!b^db^!Q zLSW*#I#NYfd5z-3gXg+t1X6b#&oOIE$}jE-BsToI&R`T{StOAX7_T^XU zTuS3zfvMi}XA!cP!@NMc9f7)}Y3GNrv~We>%BEI<^n6p0&-_4^rE1Bh4zx7BR8D=# z!c~$fdvcq~7NnAqxEkyC7K^w^#-2VlWsk}v^5w;Hjx8=^@d1_urd#SzZ}?tKneQCaR9swEq~@4Q6Vfop@IgVnHth* zPFJLW--?E&*NB1YI3-rg@mOkuLnX?QtBz0IV;*%m2VsYoGgZG6)byqkji1E{TZ+J_ z*gfAjp$SxbN1LW!4>Q=n*J*quu+V$1H|dUdk%5c0JY$S2<*(98z%3_-{apYnon>R?sGIzJ&EhFPz~Tg~1DNam~gFv~SZJ z!#fz~2``Il1d2d@`x6tni!U$}*~@(^`}RHBzp(K1CEl-0zM8o^Ir{I~t@*inV*dqh z%UCPY-e*GwTicH4)4*8q<1()zEe@Ic$TXA9d1S|CN_yM2dGnQSzQ+$q9 zs<@1AQQ~ftSX;QmU4n=udaHcYgxyAaE+owSotXWO(|J I_o|rv4=uxdJOBUy delta 250 zcmdnOvx$Z4)W2Q(7#J9A8B`~7O?6{r;Bu`};h%zz=AY_9pi%U{-c^JeQBqr`xFp*+p;Ppt&$;sDI2+uFdNm1ltkYSKx zXOM*%nVGL2P?VWh5?oT0nh4Y<&!8|_nNewS7L)ws^Gsrs+gQvP87J>$kqlyD5CFQ6 zg@KVlkbxb@GG|}{vKbgSH!%ncNp541-U#F{F>nD%E+Eaoz|6n_RL%`#@jw(ZC^9Gk Nd5jFoK$3|;1pxboF_8cO diff --git a/src/App.java b/src/App.java index b75b810..7685d4d 100644 --- a/src/App.java +++ b/src/App.java @@ -1,7 +1,29 @@ -public class App { - public static void main(String[] args) throws Exception { - System.out.println("Hello, World!"); - } -} +import java.util.Random; -/* TEsts */ \ No newline at end of file +public class App { + public static void main(String[] args) { + System.out.println("A code request you have made,"); + System.out.println("Fear not, for I am here to aid."); + System.out.println("In Java, a language so grand,"); + System.out.println("I'll lend you a helping hand."); + + // Creating a Random object + Random random = new Random(); + + // Define the range for x and y + int minRange = -1000; + int maxRange = 1000; + + // Generate random values for x and y within the specified range + int x = random.nextInt(maxRange - minRange + 1) + minRange; + int y = random.nextInt(maxRange - minRange + 1) + minRange; + + int sum = x + y; + + System.out.println("Generated random x: " + x); + System.out.println("Generated random y: " + y); + System.out.println("The sum of " + x + " and " + y + " is: " + sum); + + System.out.println("May the code be with you!"); + } +} \ No newline at end of file