Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Task01 {
public static void main(String[] args) {
//Найдите значение функции: z = (a – 3 ) * b / 2 + c.

float a,b,c,z;
float a,b,c,z;//code convention - каждую переменную объявляем в отдельной строке
a= 5.6f;
b=6;
c=-2.8f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void main(String[] args) {
y= 12.22345245;

if(x>y) {
System.out.println("x="+x+" y="+y);
System.out.println("x="+x+" y="+y);// здесь лучше использовать if, без else - и не повторять одинаковый вывод
} else {
temp=x;
x=y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public static void main(String[] args) {

}

}
}// Молодец