 Hello friends, I'm Sanjay Bhukta. I welcome you on Sanjay Bhukta Tech School. In this video, I'm going to tell how to use GUI tool. So I will explain two things. First is a syntax and second a program with the help of do well. So here you can see our syntax is written. So it is having initialization, then it is having statement inside the loop and increment decrement and then at end it is having a condition, combination condition. So if this condition is true, then loop will repeat. If condition is false, then loop rotation will be stopped. So first of all, this initialization takes place. Then this statement will be executed. Then this increment decrement will be performed. Then this condition will be checked. If condition is true, then it will again come to statement execution and this way it iterates. When this condition is false, then it is terminated. So do well is basically a bottom test or loop. So it executes at least once. So now there is a requirement like if condition is true or false at the first time, then also it will execute at least once. So no matter your condition is true or false, it will execute at least once. So what is the benefit of this? Because if first time condition is false, then unnecessarily it is executing at least once. So we don't want to do that. So right now this is drawback. I am going to convert this drawback into advantage of do well. So I am going to implement a program in front of you. So the requirement of program is we need to read any numbers from user and we need to calculate their sum. And we will read numbers as per user's choice. So if user say like I want to add a number, then that number will be entered and will be added, otherwise not. So here our requirement is user will provide at least one number and after that he will provide his choice whether he want to add another number or not. So now I am going to implement that program in front of you. So here you can see I did get three variables n to read number s to calculate sum and csh is for choice. Then before starting printf I am writing do and I will write printf inside it because I want to repeat that. So it will display the masses enter number and after this we need to use semicolon and here you can see the enter number will be stored inside the n variable. Now we can add this into s. So n will be added to s and the result will be stored inside s. After this addition again I am writing a printf so it will display do you want to add more number. So press one for yes and zero for no. So this printf will be displayed. So if you want to add more numbers you need to press one that will be equivalent to yes otherwise you can press zero that is equivalent to no. Now we can read this and I am going to read this choice into csh variable and then I am going to apply one. So this is our condition inside while I am writing csh w equals to one. So if user provided one into the csh variable then this condition will be true. If this condition is true then only your loop will repeat. Now let's check how it will execute. So execution begins from here like two and currently we will printf. So this printf will print enter a number on screen. So user will enter a number and so let's say user entered pipe inside it. So that number will be added into s. So s will be having pipe then this masses will be printed. So let's say user entered one so value of csh will be one then this condition will be checked. So this condition is true. So again control will transfer to here. So again this masses enter a number will be displayed. So user has to enter new value inside and so let's say this time user entered 10. So now s plus and so current value of s is 5. So 5 will be added into 10. So new number will become 15. Now again this printf will print on screen. So suppose this time user entered 0. User don't want to add more numbers. Right. So check this condition csh w equals to one. So it is false. It means this loop execution will be terminated now. So no more input and no more addition will be done. So finally our sum is 15. So after this while you can write a simple printer statement and this printer will print the sum that is available inside the s variable and then you can close the main function. So I hope you understood how I implemented this program with the help of Dubai. So here I hope you understood whenever we execute the program. So at least first time user will provide a number and then after providing that first number on providing second number. So before providing second number user need to select a particular choice. So here you can see choices are to one or zero. So if user pick one then loop will repeat otherwise loop will be terminated. So this way I hope you understood how we can use the topic of Dubai that is execute at least once whether the condition is true or false. So in some scenarios you require this situation like first time forcefully you want to execute the statements and then after first execution taking execution depends upon the user's choice. So in those scenarios you can implement the do value. So I think this is the advantage of do value. So wherever you want to execute your statements at least one and then the choice will depend upon the user then you can implement do value. Otherwise we can implement for and while you do those are very different. So I hope you understood the explanation which I presented in this video in front of you. And if you want to watch more programming related videos, you can open my channel and go to playlist. So there are various programming related videos are available. So I uploaded more than 1000 videos and you can watch them and you can understand how programming can be implemented. So I uploaded videos related to C++, Java, PHP, Python, Salesforce, etc. So do follow those videos and learn programming. Thank you for watching this video.