While loop Question | Arithmetic Operators in Java using Scanner function | also use breck , Case, Switch statement in this program | SM World
Video Explanation
1. It imports the Scanner class from the java.util package.
2. It creates an instance of the Scanner class called sc to get input from the user.
3. It uses a while loop with a condition of true to continuously prompt the user for input until they choose to exit the program.
4. It prints out instructions to the user to enter two numbers and select an arithmetic operation to perform.
5. It uses the nextInt() method of the Scanner class to read in two integers entered by the user.
6. It uses a switch statement to perform the selected arithmetic operation and display the result to the user.
7. The program uses x, y, add, sub, multi, div and mod variables to store the input values and the result of each arithmetic operation.
In this video we will see :
How to use arithmetic operators?
when we use arithmetic operation?
in this question we use breck , case , & also switch statement.
_________________________________________________________________________
Social media
linkedIn:- / shivam-kumar--
Source code link:-
___________________________________________________________________
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
#java #arithmeticprogression #smworld #code #scanner #trending #virel #interview #interviewquestions #interviewpreparation
Thanks for watching 😊
На этой странице сайта вы можете посмотреть видео онлайн While loop Question | Arithmetic Operators in Java using Scanner function | intellectHub длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь IntellectHub 20 Август 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 125 раз и оно понравилось 2 зрителям. Приятного просмотра!