Day 10

 Hello again.

Today I learned how to make a simple menu and wrote it in the form of a code and it worked

The content of the mod is that I added two numbers, for example 20 and 10, exactly

And I displayed a menu to the user, and if he chooses number 1, he adds the two numbers and displays the result

But if he chooses number 2, he divides the two numbers and prints the result

And number 3, he multiplies them and prints the result also on the output

But if he chooses 0, the program exits the system and ends

It was an easy program, but it is very useful later, as I learned how to make the menu displayed on every application that we see, and each click opens different magazines, and when I click on exit, the program exits as with number 0 in my code

I also used the case condition that we learned previously


And I also used do while, which is a new condition, but it is similar to the loop, but we write the while at the end of the code so that when we click 0, it exits the program

تعليقات

المشاركات الشائعة