I need someone to write the code for the following program:
http://www.wrestlefury.com/prog.jpg
I've created the interface but the code is what i cant do. Any help would be much appreciated.
Printable View
I need someone to write the code for the following program:
http://www.wrestlefury.com/prog.jpg
I've created the interface but the code is what i cant do. Any help would be much appreciated.
First, you did not actually explain what the problem is. Do you need a program that parses a string to check how many words of a certain length are there?
How much will you pay?
Code:using System;
using System.Text.RegularExpressions;
using System.Text;
using System.Collections;
namespace ParserNamespace
{
class Class1
{
public int[] ParseString(String text)
{
int [] vector = new int[6];
Regex reg = new Regex(" |, | ,|,");
StringBuilder sbuilder = new StringBuilder();
foreach(string s in reg.Split(text))
{
if(s.Length<6) vector[s.Length-1]++;
else vector[vector.Length-1]++;
}
return vector;
}
[STAThread]
static void Main(string[] args)
{
Class1 test = new Class1();
int [] results = test.ParseString("this is just a simple text,nothing more, nothing less");
int i=1;
foreach(int val in results)
{
Console.WriteLine("Words of length {0} : {1}",i++,val);
}
}
}
}
How much do you cost?
The program should calculate and display the number of words that contain 1, 2, 3, 4 or 5 characters as shown in the example. Any words that contain 6 or more characters should be counted together.
If the user does not enter a string before pressing the button, an error message should be displayed and the user asked to enter another string.
The program should be able to handle situations where there is more than one space between the words in the sentence. Punctuation characters such as comma, full-stop, etc can be treated as characters in words.
Are you familiar to C# or not? What I've written basically does want you need, except that is a console application. I'm sorry, but I'm not going to write the entire application for you.
Rob316, you can offer someone to write code for you in JOBS Forum.
Your code doesnt work