Commits

Nick Raptis committed 2510644

Some corrections in Lab01 and Lab02

  • Participants
  • Parent commits b85e8e1

Comments (0)

Files changed (2)

File src/Correct/Lab01/Lab01_5.java

 		double ad,bd;
 		as=JOptionPane.showInputDialog("Δώσε έναν αριθµό: ");
 		bs=JOptionPane.showInputDialog("Δώσε ακόµη έναν αριθµό: ");
-		ad=Double.parseDouble(bs);
+		ad=Double.parseDouble(as);
 		bd=Double.parseDouble(bs);
 		sum=ad+bd;
 		product=ad*bd;

File src/Correct/Lab02/Lab02_3.java

 public class Lab02_3 {
-public static void main(String args[])
-	{
-	int pl=50000;
-	short y=0;
-	while (pl<=70000)
-	   {
-	   pl*=1.05;
-	   y++;
-	   }
-	System.out.println(y);
-	}
-
-}
+    public static void main(String args[])
+        {
+        long sum=0;
+        for(int i=1;i<=100;i++)
+        sum+=Math.pow(i,2);
+        System.out.println(sum);
+        }
+}