diff --git a/Yashassvi/One.java b/Yashassvi/One.java new file mode 100644 index 0000000..54a63d7 --- /dev/null +++ b/Yashassvi/One.java @@ -0,0 +1,21 @@ +import java.util.Scanner; +public class One { + public static void main(String[] args) { + System.out.println("Input integer"); + Scanner input = new Scanner(System.in); + int n = input.nextInt(); + if(n> 100 && n<500){ + if (n%2==0){ + System.out.println("Even number"); + } + else{ + System.out.println("Odd Number"); + } + } + else { + System.out.println("Number is neither greater than 100 nor less than 500."); + } + } + +} + diff --git a/Yashassvi/Three.java b/Yashassvi/Three.java new file mode 100644 index 0000000..cc8e8cf --- /dev/null +++ b/Yashassvi/Three.java @@ -0,0 +1,20 @@ +import java.util.*; +public class Three { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + System.out.println("Please enter percentage integers"); + int p = input.nextInt(); + if (p>90){ + System.out.println("Your Grade is A\nPerformance : Excellent"); + } + else if(p>75 & p<90){ + System.out.println("Your Grade is B\nPerformance : Good"); + } + else if(p < 75 & p > 60){ + System.out.println("Your Grade is C\nPerformance : Pass"); + } + else{ + System.out.println("fail"); + } + } +} diff --git a/Yashassvi/Two.java b/Yashassvi/Two.java new file mode 100644 index 0000000..0bd9754 --- /dev/null +++ b/Yashassvi/Two.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +public class Two { + public static void main(String[] args) { + System.out.println("Please enter a character."); + Scanner input = new Scanner(System.in); + char a = input.next().charAt(0); + if (a == 'a' || a == 'e' || a== 'i' || a == 'o' || a == 'u'){ + System.out.println("Entered character is a vowel."); + } + else { + System.out.println("Entered character is a consonant."); + } + } +} \ No newline at end of file