diff --git a/Java/program-3/README.md b/Java/program-3/README.md new file mode 100644 index 00000000..9c51e51c --- /dev/null +++ b/Java/program-3/README.md @@ -0,0 +1,3 @@ +Program-3 + +Write a program in java to count the number of consonants and vowels in a string. \ No newline at end of file diff --git a/Java/program-3/program.java b/Java/program-3/program.java new file mode 100644 index 00000000..a108adc6 --- /dev/null +++ b/Java/program-3/program.java @@ -0,0 +1,17 @@ +import java.io.*; +import java.util.*; +class Prg{ + public static void main(String args[]) + { + Scanner sc=new Scanner(System.in); + String s=sc.next(); + int v=0; + for(int i=0;i