Vowel Finder [SOURCE]

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

TheMystery

Retired Staff
Active Member
Dec 6, 2013
648
364
133
Hey CC Here Is A Simple Code For If You Wanted To Make A Vowel Finder;)

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Vowel_Counter
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
try
{
GetVowel(textBox1.Text);
}
catch
{
MessageBox.Show("Please Enter a string!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void GetVowel(string voweltext)
{
//Arrange the text into a character array
char[] Arr = voweltext.ToCharArray();
//Start our vowel count
int VowelCount = 0;
//Reset out text strings
textBox2.Text = null;
label2.Text = "Vowels:";

for (int i = 0; i < Arr.Length; i++)
{
switch (Arr[i].ToString().ToLower())
{
case "a":
case "e":
case "i":
case "o":
case "u":
//Input the vowel in textbox2
textBox2.Text += Arr[i].ToString() + "; ";
//Increase the vowel count by one
VowelCount++;
break;
}
}

//Remove the last character of our string
string NewText = textBox2.Text.Substring(0, textBox2.Text.Length - 2);
//Set the new text
textBox2.Text = NewText;
//Update label text to include the number of vowels.
label2.Text += ' ' + VowelCount.ToString();
}
}
}


Enjoy! :)
 

Nostafaru

Moderating the Crunch Bunch.
Retired Staff
Community Elite
Community Veteran
Determined Poster
Active Member
Console ID Poster
Apr 6, 2014
2,020
1,783
443
General chit-chat
Help Users
  • Chat Bot:
    Christo has joined the room.
  • @ QM|T_JinX:
    damn this jb is alot of work and set up haha but i got it running and ready to go lol
  • Chat Bot:
    X-Rudboy-X is our newest member. Welcome!
  • Chat Bot:
    smilt is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • @ lurch6661:
    cool bro
  • @ lurch6661:
    yea the new jb looks like alot of work
  • @ QM|T_JinX:
    to set up the first time yea with all the crap you need to install lol
  • @ QM|T_JinX:
    lol downloaded RE4 xd
  • @ lurch6661:
    lol awesome
  • @ lurch6661:
    i tried to put windows on a ps4 its said fail real big lol
  • @ QM|T_JinX:
    hahah
  • @ QM|T_JinX:
    chips like that has to be flashed to be able to put linux or windows on it
  • @ lurch6661:
    ok
  • @ lurch6661:
    maybe a ps3 can run windows
  • @ QM|T_JinX:
    it can run linux not sure of windows
  • @ lurch6661:
    i no what your thinking why bother well iam bored
  • @ lurch6661:
    lol
  • @ QM|T_JinX:
    lol evn when bored no us of trying bc it wont work lol
  • @ QM|T_JinX:
    use
  • @ lurch6661:
    lol
  • @ lurch6661:
    i will jsut build another pc
  • Chat Bot:
    Christo has joined the room.
    Chat Bot: Christo has joined the room.