From c8def23852d5481f91dc10ca8052f4f062902b8d Mon Sep 17 00:00:00 2001 From: Trisodium <139225140+Trisodium-ru@users.noreply.github.com> Date: Sat, 5 Oct 2024 23:35:06 +0300 Subject: [PATCH] fix: teacher's solution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ранее в теории не было информации про функцию print. К тому же, оптимальнее использовать уже изученную функцию println вместо 2 вызовов print. --- modules/30-variables/15-variable-expressions/App.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/30-variables/15-variable-expressions/App.java b/modules/30-variables/15-variable-expressions/App.java index f0678ed5..99c82fb3 100644 --- a/modules/30-variables/15-variable-expressions/App.java +++ b/modules/30-variables/15-variable-expressions/App.java @@ -4,12 +4,10 @@ public static void main(String[] args) { // BEGIN var dollarsCount = eurosCount * 1.25; - System.out.print(dollarsCount); - System.out.print("\n"); + System.out.println(dollarsCount); var rublesCount = dollarsCount * 60; - System.out.print(rublesCount); - System.out.print("\n"); + System.out.println(rublesCount); // END } }