oh sorry I posted before I saw your post laserlight so I will try and code it the way you said makes sense
Type: Posts; User: artistunknown
oh sorry I posted before I saw your post laserlight so I will try and code it the way you said makes sense
You know the more I think about it I'm still stuck because if I use unsigned int array it includes 0 which I can't include 0 in the problem
Is there some kind of logic I'm missing here I'm back to...
Yeah I guess its not only the end value that would be a problem but the minimum value too I guess I just didn't think of it because from 1-100 its 3.00 dollars freight charge but what if I put in a...
Well, that makes sense I guess it would have to be the end value because I don't think the beginning value would work because I couldn't test for 9999 and have it be six elements
do you think it means actually use three arrays one for the low value and one for the high value and one for the freight charges
Yeah it's exactly from the book
I don't know a thing about structures
but you would suggest using a structure. I guess Thanks I guess I got some reading to do I don't want anyone to do the problem...
You know I got to thinking maybe a two dimensional array could work!
Example 7.9 Calculate freight charges
Design an algorithm that will read an input weight for a item to be shipped., search an array of shipping weights and retrieve a corresponding freight...
Well I figured it out myself I made a mistake in my code:
else
{
Console.WriteLine("ERROR: {0} could not be created", INPUT_FILE);
...
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace Chapter6Problem10
{
class Program
{
const string INPUT_FILE =...
I thought closing the files would help but it doesn't
Your code works just fine I just don't understand why my doesn't I figured I had everything needed in there
I was just trying to write it...
now I know what I did wrong and you gave me the idea whiteflags I forgot to close the files dam I'm stupid
using System;
using System.IO;
namespace FileExperiment
{
class Program
{
const string INPUT = "\\Projects\\FileExperiment\\FileExperiment\\Test.txt";
const string...
I didn't realize what I was writing makes sense
Thanks everyone for teaching me a little about Regular expressions.
I probably would have giving up by now if it wasn't for this forum
I kind of thought that spacing didn't matter in this statement or declaration whatever its called " Regex validate = new Regex(@"[A-Za-z]{2}\d{4}"); "
I was getting mixed up about this code " ...
sorry itsme86 I know you were right all along about the spaces my bad
I read the posts but I think I got a little mixed up about what it meant
cstryx I'm curious why you say Regular Expressions are slow my book acts like Regular Expressions are very useful but I still like your approach to it
Wow whoever you are you know your ........ this code is kickass I haven't learned string manipulation yet but I hope to learn it pretty soon also I thought this
[A-Za-z]{2}\d{4}
] {2}\d {4}...
Cat sorry about me saying what the heck is that stuff
that code is a little too sophisticated for me it goes over my head what I really wanted was just to validate a string with 2 characters and...
I get it now this works perfectly
@"[A-Za-z][A-Za-z]\d\d\d\d"
me gets why this works now
I don't know why this code works can someone explain why it does (@"[A-Za-z]\d\d\d\d") I don't see how come I don't have to have a place holder for the characters I don't know why this works but it...
my code does work I figured out on my own just today this is all I had to do to validate the code what the heck is all that stuff your talking about
Regex validate = new Regex(...
here's the attachments if you want to look at them
anyway it doesn't say how to validate the part number so I did something a little different here's my code:
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace...
A parts inventory record contains the following fields:
1. record code (only code 11 is valid)
2. part number (six characters; two alpha and four numeric, EX. AA1234
3. part description
4....