-
-
Save makaliuk/7e9c812b55cb3775e1a84ed3aacbaede to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class normal { | |
public static void main (String[] args){ | |
int a=40,b=45; | |
System.out.println("Ploscha pramokutnogo trikutnika " | |
+ a+" и "+ b+ " равна " +(a*b)/2); | |
double c=Math.sqrt(a*a+b*b); | |
System.out.println("Perimetr pramokutnogo trikutnika " | |
+ a+" и "+ b+ " gipotuneza " + (float) c+" rovno " +(float)(a+b+c)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public class Main { | |
public static void main(String... args){ | |
for(int i = 1; i < 11; i++){ | |
for(int k = 1; k < 11; k++){ | |
System.out.print(k * i + " *"); | |
} | |
System.out.println(""); | |
} | |
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("Цикл while"); | |
int i = - 11; | |
while (i++ < 25) { | |
System.out.print(i + ", "); | |
} | |
System.out.println(" "); | |
System.out.println("Цикл do while"); | |
int k = - 10; | |
do { | |
System.out.print(k + ", ");} while(k++ < 25); | |
System.out.println(" "); | |
System.out.println("Цикл For"); | |
int c = -10; | |
for (c = -10; c < 26; c++){ | |
System.out.print(c + ", "); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment