Skip to content

Commit ace176b

Browse files
committed
code added
1 parent b4441b6 commit ace176b

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

bin/coding_19/Voowel.class

66 Bytes
Binary file not shown.
1003 Bytes
Binary file not shown.

src/coding_19/Voowel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ public static void main(String[] args) {
88
Scanner sc = new Scanner(System.in);
99
System.out.println("Enter the word: ");
1010
String input = sc.nextLine();
11+
int count = 0;
1112
String vowel = "aeiouAEIOU";
1213
for (char c : input.toCharArray()) {
1314
if (vowel.indexOf(c) != -1) {
15+
count++;
1416
System.out.println("Vowle letter is :" + c);
17+
System.out.println(count);
1518
}
1619
}
1720
}

src/lastMay24/LeapyearFromArraay.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package lastMay24;
2+
3+
public class LeapyearFromArraay {
4+
5+
public static void main(String[] args) {
6+
int ar[] = { 2022, 2020, 2018, 2012, 2016 };
7+
for (int year : ar) {
8+
if ((year % 4 == 0) && (year != 100) || (year % 400 == 0)) {
9+
System.out.println("leap year" + year);
10+
} else {
11+
System.out.println("not leap year :" + year);
12+
}
13+
}
14+
}
15+
16+
}

0 commit comments

Comments
 (0)