From dbc95a163b3949c9fd23cf62fdacd61a1ba8731c Mon Sep 17 00:00:00 2001 From: Coder Shiyar Date: Sun, 20 Feb 2022 17:12:46 +0100 Subject: [PATCH] Source code lesson 14 --- .../App.java" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "Lesson 14 - \330\247\331\204\330\257\330\261\330\263/App.java" diff --git "a/Lesson 14 - \330\247\331\204\330\257\330\261\330\263/App.java" "b/Lesson 14 - \330\247\331\204\330\257\330\261\330\263/App.java" new file mode 100644 index 0000000..0506fac --- /dev/null +++ "b/Lesson 14 - \330\247\331\204\330\257\330\261\330\263/App.java" @@ -0,0 +1,26 @@ + +public class App { + +public static void main(String[] args) { + + int counter = 10; + do{ + System.out.println(counter + "تم تنفيذ اوامر"); + counter--; + }while(counter>= 0); + + + } +} + +// Java do-while Loop +// --------------------------------------------------------------------------- +// سيتم دائمًا تنفيذ اوامر مرة واحدة على الأقل ، حتى إذا كان الشرط خاطئًا +// لأنه يتم تنفيذ التعليمات البرمجية قبل اختبار الشرط +// --------------------------------------------------------------------------- + +// do { +// // code block to be executed الاوامر الذي ترغب بتنفيذها + +// } +// while (condition الشرط); \ No newline at end of file