write a program in java to accept a string .Count all the numbers excluding vowels present in the string
Vintage:
ooo its a long one I'll answer it surely the next morning.....
Answers
Answered by
1
import java.util.Scanner;
public class abc
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
String s;
int ctr=0;
System.out.print("Enter the String:- ");
s=sc.nextLine();
for(i=0;i<s.length();i++)
if("AEIOUaeiou".indexOf(s.charAt(i))== -1)
ctr++;
System.out.println("Excluding vowels:- "+ctr);
}
}
public class abc
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
String s;
int ctr=0;
System.out.print("Enter the String:- ");
s=sc.nextLine();
for(i=0;i<s.length();i++)
if("AEIOUaeiou".indexOf(s.charAt(i))== -1)
ctr++;
System.out.println("Excluding vowels:- "+ctr);
}
}
Similar questions
Chemistry,
8 months ago
English,
8 months ago
World Languages,
8 months ago
India Languages,
1 year ago
Geography,
1 year ago
English,
1 year ago