I am an idiot. I literally listed all numbers 1-100 in switch case statement to produce a result that tells of it is an even or odd number. Luckily, the instructor acknowledged it. I didn't think of this method.
import java.util.Scanner; class EvenorOdd { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter your Number : "); int userInput = scan.nextInt(); if (userInput % 2 == 0 ){ System.out.println("YOur Number is even"); } else { System.out.println("Your Number is odd "); } } }
U just gained a new follower...great work keep it up
Awesome, thank you!
the only person that actually explains what he's doing😭😭 love you bro 🫶
Thank you so much sir.... your explanation is clear
You are most welcome
Thank you so much sir! can you also do arrays on this sir?
was very helpful thank you
You're welcome!
Thank you so much sir,I helps me a lot 😊
Always welcome
Sir your video is vary help fulll for me so thanks you so much sir you are omaging
Thank you
I am an idiot. I literally listed all numbers 1-100 in switch case statement to produce a result that tells of it is an even or odd number. Luckily, the instructor acknowledged it. I didn't think of this method.
its ok
keep writing code
it will make you better :)
you left the { sign after the if bracket yeah hope am not the only one who saw that that...correct me if am wrong but its an error
Thank you sir
May God bless you
pleasure
keep learning :)
Which software did you use for this
eclipse ide :)
@@ExampleProgram thk
Great work.
Thanks!
thank you helped so much!
You're welcome!
Can we use SciTe Software for this
What app do you use, Sir?
Visual studio code
is this work on cp?
Thank you so much❤️
You’re welcome 😊
how can you do this but using a boolean
What is brace format sir
Output nahe a raha ha
what is this scan system ? plz help
Titan here
Where is thread brother😁
is not working
What problem you are facing?
Is there a rattlesnake outside your window?
why??
import java.util.Scanner;
class EvenorOdd {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter your Number : ");
int userInput = scan.nextInt();
if (userInput % 2 == 0 ){
System.out.println("YOur Number is even");
}
else {
System.out.println("Your Number is odd ");
}
}
}