Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Yashassvi/One.java
Original file line number Diff line number Diff line change
@@ -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.");
}
}

}

20 changes: 20 additions & 0 deletions Yashassvi/Three.java
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
14 changes: 14 additions & 0 deletions Yashassvi/Two.java
Original file line number Diff line number Diff line change
@@ -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.");
}
}
}