4,439 Posted Topics
Re: Hi Jeya Rani, welcome to DaniWeb. First: **Don't resurrect old threads**. Start a new thread with your question and refer to this thread with a link, if you want to. To answer you question, try this: /// <summary> /// Read an integer from the console /// Return 0 if no … | |
Re: Nice. How about showing a table with a range like conversions between 0 and 100°C ? | |
Re: Well, if you don't know so much about matrices, [this](https://en.wikipedia.org/wiki/Matrix_%28mathematics%29) might help you on the way. | |
Re: Something like this? const int numberOfTerms = 9; //your homework mentions 9 terms. int counter = 0; while (counter < numberOfTerms) { //calculate Fib. term //output Fib. term counter++; } ![]() | |
Re: You could do it this way: if ( result < 409 ) // 0 to 408 { volt = 0 ; } else if ( result < 818 ) //408 to 817 { volt = 1 ; } etc..... | |
One of the most, if not THE most, beautiful formulas in math, is from Euler:  It combines in it a relation between the number **e**, the number **Pi** and the complex number **i**, plus the basic math symbols 1, +, = and zero. Is that not amazing? More … | |
Re: To detect if a character is a capital letter, use the IsUpper method ([see here](https://msdn.microsoft.com/en-us/library/system.char.isupper%28v=vs.110%29.aspx)) There is also an IsPunctuation method. | |
Re: Hi Arun welcome to DaniWeb. Posting some relevant code would help us solve your problem. | |
Re: You could calculate the distance of your vector between all the others and then determine which is closest. | |
Re: The English language changed dramatically around 1100 AD, because the common people thought it was fancy to use French words, like the noble people did. Every native Enlgish speaking person, can probably guess, that I'm not. I just can make myself understandable and most likely I make some grammatical mistakes … | |
Re: This will be a hard nut to crack I guess. | |
Re: *Thus rnd.Next(0,4) generates a number from 0 to 3.* Looks "logical" to me. Think most pseudo random generators use MOD somewhere in their formula and produce numbers between 0 and 0.99999999.. | |
Re: With a timer each side of the crossroad would get a more or less fair chance to pass. With motion, that would not always be the case. | |
Re: Your first suggestion will only work if `9 * celsius` is divsible by 5. celsius is defined as an int. | |
Re: Great, and your question or problem is? | |
Re: SaJiN welcome to DaniWeb! :) We could probably clear this this if you would send us a piece of the rlevant code. | |
Re: Do you have more textboxes than your code shows? | |
Re: Don't forget closing braces. Read your assignment very good, you don't use a sentinel value. Here is what I quickly made of it so far. int[] marks; int minput = 1, counter = 0, total = 0; float average = 0.0f; //try to alway use meaningful names so, no 'aveg' … | |
| |
Re: I always get the creeps, when they tell me something is for free. My philosophy here is: The only thing for free, is the sun coming up every morning. | |
Re: You could make a list with the amount bought and the rule that applies. Use select case to decide which rule. | |
Re: `SelectedIndex` returns an `int` ([see here](https://msdn.microsoft.com/en-us/library/758d90fb%28v=vs.110%29.aspx)) so you dont have to do a conversion to a string as Tinstaafl already correctly pointed out. I don't understand what you mean by *and then I'm passing that into the List (since the indexes will be the same)* Could you clarify? | |
Re: The OP definitely isn't a programmer. Speaking for myself, even in the most simple, most evident things I can make the most stupid mistakes. I debug a lot. :) But it makes me having great respect for programmers who design something great. | |
Re: OK, that's your code and your problem with it is? | |
Re: Did you try to incorporate c++ code into your C# code using the [unsafe](https://msdn.microsoft.com/nl-be/library/chfa2zb8.aspx?f=255&MSPPError=-2147217396) keyword? You also have to mark the `unsafe` option in your project properties, but I forgot where exactly. It can't be difficult to find I guess. Hope it helps a bit. | |
Re: Yes that's definitely something to start with. When building a new car engine, start with the windshiels wipers. | |
After reading this excellent [code snippet](https://www.daniweb.com/software-development/csharp/code/492766/display-excel-data-in-a-datagridview) by djjeavons, and just trying to learn WPF, I decided: "Well, let's translate that to WPF!". It was a bit harder than I thought, but a great learning experience! Her's how my screen in action looks:  Things that changed compared to the … | |
I'm referring to my snippet [Inheriting the stack class](https://www.daniweb.com/software-development/csharp/code/498828/inheriting-the-stack-class) After looong loong searches and many tries and tests, I finally came up with a version that works as I wanted to. Stacker can now handle any type of object, even with arethmetic methods in place. The virtual way as proposed … | |
Re: IMHO data hiding has nothing to do with keeping some memory locations savely locked up in a locker. In a class a field(or whatever) is marked private, because it is meant to be used only by the class. In this way other classes can not accidently manipulate it. | |
Re: This thread has already been solved. If you can read you could have seen it is marked: **This question has already been solved: Start a new discuion instead.** In your new thread and question you can always include a link to this one. Here you will never get an answer … | |
Re: There is at least an easy one: 123 = 100 + 20 + 3 3 = 2 + 1, 1 + 1 + 1 How far can you go? Are there no constraints? If we are talking number theory, you must have had that in class. If that scares you, … | |
Re: Why the hurry? Read the texbox string Use the Split method Convert every "numeric" string to an int and put in array. | |
Re: To construct a pi chart from scratch, you need to have a good understanding of the [sine](https://en.wikipedia.org/wiki/Sine) and [cosine](https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent) functions. Is that the case? | |
Re: And did you use stdio.h to show us the result you already have? Perhaps totally wrong but that won't bother us to try to solve your problem. | |
Re: @Mandeep_1 Don't hijack some one elses thread! Start a new thread with shows what you already have done on your homework assignment! Just posting your homework assignment won't get you any help. Besides, don't think the OP will answer her after 3 years | |
Inheritance with generic types can sometimes be tricky. If you would inherit from a Stack<double>, no problem, but what if you want to keep it as generic as possible? Maybe it's a bad idea, but I wrote something like `class Stacker<T> : Stack<T>` and in Stacker I implemented some arithmetic … | |
Re: I don't know what unity3d is, but if you have difficulties converting between radians and degrees, this C# might help: public const double cToDegrees = 180.0 / Math.PI; public const double cToRadians = Math.PI / 180.0; static public double ToRadians(double degrees) { return degrees * cToRadians; } static public double … | |
Re: Why do you expect us to do YOUR homework? | |
Re: Don't think there is less competence and that complexity is an issue. But have we created a monster with internet? What would happen if tomorrow it stopped? What if you took away all the smart(smart?) phones, laptops etc. Would the world still function as it does now? I guess this … | |
Re: Hi, Robin welcome to DaniWeb. :) The only way is practice, practice and practice. No one has ever become a good programmer bij watching the grass grow. For C there are tons of tutorials on the web. Search and start there. | |
Re: Is that an order towards us? Why don't YOU write it and come back with a question if you encounter problems. Then we will be happy to help. | |
Re: We don't do homework. Use a `for` loop to determine how many numbers a number must be input. In this for, also use an `if` statment to determine if your number is positive or negative. | |
Re: `UpdateImage()` knows nothing about an `Image` so how could it update it? You got to have more something like: `private void UpdateImage(PictureBox aPict)` |
The End.