Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktober Contribution #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
6 changes: 6 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@
- Bio: New to github and coding in general
- Github: JellyFishJuggler(https://github.com/JellyFishJuggler)

## Name: [Vinayak Sharma](https://github.com/vinayak19-alt)

- Place: India
- Bio: Mobile Application Developer
- Github: vinayak19-alt(https://github.com/vinayak19-alt)

28 changes: 28 additions & 0 deletions profiles/VinayakSharma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Vinayak Sharma

### Location

Agra, Uttar Pradesh, India

### Academics

SRM University, Ghaziabad

### Interests

- Java
- Android
- Flutter
- Music

### Development

- Mobile Application Developer

### Projects

- Flash Chat - A chatting Application which let users to communicate in rael-time.

### Profile Link

[Vinayak Sharma](https://github.com/vinayak19-alt)
22 changes: 22 additions & 0 deletions scripts/VowelsConsonants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import java.util.Scanner;

public class VowelsConsonants {
public static void main(String[] args) {
System.out.println("Enter your String:");
Scanner sc= new Scanner(System.in);
String s = sc.nextLine();
calculate(s);
}
static void calculate(String s){
int count1=0, count2=0;
for(int i=0; i< s.length()-1; i++){
if(s.charAt(i) == 'a' || s.charAt(i) == 'e' || s.charAt(i) == 'i' || s.charAt(i) == 'o' || s.charAt(i) == 'u'){
count1++;
}else{
count2++;
}
}
System.out.println("No. of Vowels:" + count1);
System.out.println("No. of Consonants:" + count2);
}
}