Here's a Python program that accomplishes what you described:
```python
word = input("Enter a word: ")
vowels = ['a', 'e', 'i', 'o', 'u']
for char in word:
print(char)
if char.lower() in vowels:
print("Vowel detected!")
```
This program prompts the user to enter a word, then iterates through each character in the word. It prints each character on a separate line. If the character is a vowel (case-insensitive), it also prints "Vowel detected!".
Answers & Comments
Answer:
aight, this for java
Explanation:
import java.util.*;
class Gokgok3000
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int i,vc=0;
String s;
char c;
System.out.println("Enter a string");
s=sc.next();
System.out.println("The characters :");
for(i=0;i<s.length();i++)
{
c=s.charAt(i);
System.out.println(c);
}
for(i=0;i<s.length();i++)
{
c=Character.toUpperCase(c);
if(c=='A'||c=='E'||c=='I"||c=='O'||c=='U')
{
System.out.println(c);
vc++;
}
}
System.out.println("The number of vowels:"+vc);
}
}
Verified answer
Answer:
Here's a Python program that accomplishes what you described:
```python
word = input("Enter a word: ")
vowels = ['a', 'e', 'i', 'o', 'u']
for char in word:
print(char)
if char.lower() in vowels:
print("Vowel detected!")
```
This program prompts the user to enter a word, then iterates through each character in the word. It prints each character on a separate line. If the character is a vowel (case-insensitive), it also prints "Vowel detected!".