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 😊
Sur cette page du site, vous pouvez voir la vidéo en ligne While loop Question | Arithmetic Operators in Java using Scanner function | intellectHub durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur IntellectHub 20 août 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 125 fois et il a aimé 2 téléspectateurs. Bon visionnage!