Question about Compilers & Programming Tools

1 Answer

Help give me the code on displaying the number of consonant as well as the number of vowel as i enter a word... thank you..hoping that you will help me on this problem

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 1 Answer

I did not solve my problem yesterday.
that's why i need your help..
please help me to solve my problem that i posted yesterday.i need your help.
thank you very much.

Posted on Feb 21, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How do I break the work "exhibition" into syllables?


Have your program split the word into groups of vowels and consonants ie 'exh', 'ib', 'it', 'ion'. For example if the word starts with a vowel, in this case 'e', continue to group it until it reaches the first vowel (i in the 2nd group) after the group of consonants (x and h in the first group), and repeat.

Sep 26, 2014 | Compilers & Programming Tools

1 Answer

How do I divide the word meat into syllables?


Given your list of words, It appears to me that what makes up a syllable is the vowels in the word.. each time 1 or more vowels are separated by 1 or more consonants/symbols, a syllable is born.
so, have an array of characters containing vowels.
now iterate through the given word and create a new syllable(String) by adding the characters you are inspecting until you find a vowel.. now continue to add the vowels you find until you find a consonant/symbol.. that's where your new syllable ends (you can add it to a List if you want or just output it to the command line) ..and if you haven't gone through the entire word yet, create a new syllable(String) and repeat the process.

Good luck

Sep 10, 2014 | Compilers & Programming Tools

1 Answer

C# code wite a program to accept a number from the user and display all the prime numbers fro zero up to the numbers entered by user?


#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,rem,prime,primchk=1,chk;
clrscr();
printf("\nEnter the limit\n");
scanf("%d",&n);
printf("\n\n\nThe prime numbers are\n");
printf("\n2\t3\t");
for(primchk=1;primchk<=n;primchk++)
{
for(i=2;i<primchk;i++)
{
if(primchk%i==0)
{
chk=1;
chk=0;
break;
}
if(i==primchk-1)
{
if(chk==0)
{
printf("%d\t",primchk);
chk=0;
}
}
}
}
getch();
}

May 20, 2009 | Compilers & Programming Tools

1 Answer

Program


Sub aa()
'
' aa Macro
'
'
Dim a As String
a = "how are you this is dharani"
Dim leng, cnt As Integer
leng = 1
cnt = 0
While leng <= Len(RTrim(a))
If Mid(a, leng, 1) = " " Then
cnt = cnt + 1
End If
leng = leng + 1
Wend
If Len(RTrim(a)) > 0 Then
cnt = cnt + 1
End If
MsgBox Str(cnt) + " Words"
End Sub

Feb 27, 2008 | Compilers & Programming Tools

2 Answers

Visual basic 6.0


Use a compare (instr) command to search the sentence for punctution and spaces. Increment a variable for each word found, resetting the search string and retaining the start position of each find.

Feb 27, 2008 | Compilers & Programming Tools

1 Answer

Program


I wrote this as a vbscript. It's Visual Basic code in windows script. If you have XP, just copy the text into notepad and save it as "vowel.vbs". Now double click the newly created script file.

' vowel.vbs
'
' This VBScript is used to count the vowels and consonants in a string.
' Designed and Tested on Windows XP Pro SP2
'
' Version 1.0.0 - 02.20.2008
'
' This code may be freely distributed or modified.
' -----------------------------------------------------------------'

Option Explicit
Dim str
Dim vowels
Dim consonants
Dim i

vowels = 0
consonants = 0
str = "hello"

for i = 1 to len(str)
select case mid(str,i,1)
case "a"
vowels = vowels + 1
case "e"
vowels = vowels + 1
case "i"
vowels = vowels + 1
case "o"
vowels = vowels + 1
case "u"
vowels = vowels + 1
case else
consonants = consonants + 1
end select
next

msgbox "Vowels = " & vowels
msgbox "Consonants = " & consonants
'End of script.

Feb 21, 2008 | Compilers & Programming Tools

2 Answers

Help me


this the code for your problem. by the way this for vb6.0

Sub CountCharacters(Text As String)
Dim iVowel As Integer
Dim iCons As Integer
Dim iNum As Integer
Dim iSpace As Integer
Dim iOther As Integer

Dim cnt As Integer
Dim sChar As String

For cnt = 1 To Len(Text)
sChar = LCase(Mid(Text, cnt, 1))

Select Case sChar
Case "a", "e", "i", "o", "u" ' And sometimes "y"?
' Vowel
iVowel = iVowel + 1
Case "a" To "z"
' Includes the first case, but VB matches the first case and stops
iCons = iCons + 1
Case "0" To "9"
' Numbers
iNum = iNum + 1
Case " ", vbTab, vbLf
' Space characters
' Not including vbCr as this will likely be dealing with Windows text
' and I only want to match one character for a newline
iSpace = iSpace + 1
Case Else
If sChar <> vbCr Then iOther = iOther + 1
End Select
Next cnt

Debug.Print "Text: " & Text
Debug.Print "Vowels: " & CStr(iVowel)
Debug.Print "Consonants: " & CStr(iCons)
Debug.Print "Numbers: " & CStr(iNum)
Debug.Print "Space characters: " & CStr(iSpace)
Debug.Print "Other: " & CStr(iOther)
End Sub

Feb 21, 2008 | Compilers & Programming Tools

1 Answer

Help me


Sub CountCharacters(Text As String)
Dim iVowel As Integer
Dim iCons As Integer
Dim iNum As Integer
Dim iSpace As Integer
Dim iOther As Integer

Dim cnt As Integer
Dim sChar As String

For cnt = 1 To Len(Text)
sChar = LCase(Mid(Text, cnt, 1))

Select Case sChar
Case "a", "e", "i", "o", "u" ' And sometimes "y"?
' Vowel
iVowel = iVowel + 1
Case "a" To "z"
' Includes the first case, but VB matches the first case and stops
iCons = iCons + 1
Case "0" To "9"
' Numbers
iNum = iNum + 1
Case " ", vbTab, vbLf
' Space characters
' Not including vbCr as this will likely be dealing with Windows text
' and I only want to match one character for a newline
iSpace = iSpace + 1
Case Else
If sChar <> vbCr Then iOther = iOther + 1
End Select
Next cnt

Debug.Print "Text: " & Text
Debug.Print "Vowels: " & CStr(iVowel)
Debug.Print "Consonants: " & CStr(iCons)
Debug.Print "Numbers: " & CStr(iNum)
Debug.Print "Space characters: " & CStr(iSpace)
Debug.Print "Other: " & CStr(iOther)
End Sub

Feb 21, 2008 | Compilers & Programming Tools

2 Answers

Visual basic code


'Text1 is a textbox or a string you can use

Private Sub Command1_Click()
Dim a
Dim vow, con As Integer
vow = 0
con = 0
For i = 1 To Len(Text1)
a = Mid(Text1, i, 1)
If (a = "a" Or a = "e" Or a = "i" Or a = "o" Or a = "u") Then
vow = vow + 1
Else
con = con + 1
End If
Next
MsgBox "Vowels: " & vow & vbNewLine & "Consonants : " & con

End Sub

Feb 19, 2008 | Compilers & Programming Tools

Not finding what you are looking for?
Compilers & Programming Tools Logo

Related Topics:

88 people viewed this question

Ask a Question

Usually answered in minutes!

Top Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Florin

Level 3 Expert

733 Answers

Are you a Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...