4,439 Posted Topics

Member Avatar for shadowrider

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 …

Member Avatar for ddanbe
0
9K
Member Avatar for fonzali

Nice. How about showing a table with a range like conversions between 0 and 100°C ?

Member Avatar for fonzali
2
2K
Member Avatar for cambalinho

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.

Member Avatar for ddanbe
0
80
Member Avatar for mrismich

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++; }

Member Avatar for TheFearful
0
221
Member Avatar for naz1234

You could do it this way: if ( result < 409 ) // 0 to 408 { volt = 0 ; } else if ( result < 818 ) //408 to 817 { volt = 1 ; } etc.....

Member Avatar for jnneson
0
265
Member Avatar for hazelkahn
Member Avatar for ddanbe

One of the most, if not THE most, beautiful formulas in math, is from Euler: ![Euler_e_pi_i.png](/attachments/large/1/b32f45540a27b3efc328d14c60ee286c.png "align-center") 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 …

Member Avatar for JOSheaIV
1
616
Member Avatar for IconiCxPimp

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.

Member Avatar for IconiCxPimp
0
280
Member Avatar for Arun_14

Hi Arun welcome to DaniWeb. Posting some relevant code would help us solve your problem.

Member Avatar for Santanu.Das
0
180
Member Avatar for Doogledude123

You could calculate the distance of your vector between all the others and then determine which is closest.

Member Avatar for overwraith
0
324
Member Avatar for egieboom12
Member Avatar for Reverend Jim

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 …

Member Avatar for Reverend Jim
7
5K
Member Avatar for Shizza
Member Avatar for Dark_1

*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..

Member Avatar for Reverend Jim
0
214
Member Avatar for Sayyo

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.

Member Avatar for ddanbe
0
74
Member Avatar for Toby14

Your first suggestion will only work if `9 * celsius` is divsible by 5. celsius is defined as an int.

Member Avatar for Toby14
0
143
Member Avatar for boomtifier
Member Avatar for SaJiN_1

SaJiN welcome to DaniWeb! :) We could probably clear this this if you would send us a piece of the rlevant code.

Member Avatar for SaJiN_1
0
184
Member Avatar for salesman91
Member Avatar for almostbob
Member Avatar for Maegen

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' …

Member Avatar for ddanbe
0
1K
Member Avatar for sssajibsaha
Member Avatar for Dani

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.

Member Avatar for Reverend Jim
1
495
Member Avatar for notcloud

You could make a list with the amount bought and the rule that applies. Use select case to decide which rule.

Member Avatar for notcloud
0
87
Member Avatar for Tim_6
Member Avatar for James_43

`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?

Member Avatar for James_43
0
3K
Member Avatar for atsproperty

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.

Member Avatar for Reverend Jim
-3
513
Member Avatar for Sandeep_14
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
832
Member Avatar for altjen

Yes that's definitely something to start with. When building a new car engine, start with the windshiels wipers.

Member Avatar for rproffitt
0
248
Member Avatar for krofox
Member Avatar for kennethcbrown15
0
84
Member Avatar for ddanbe

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: ![WPFscreen.png](/attachments/small/1/ac05d33ccd8a190d0576fa063e54749f.png "align-left") Things that changed compared to the …

Member Avatar for ddanbe
1
552
Member Avatar for ddanbe

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 …

Member Avatar for JOSheaIV
0
279
Member Avatar for anumash

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.

Member Avatar for ddanbe
0
280
Member Avatar for vinaya

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 …

Member Avatar for ddanbe
0
11K
Member Avatar for Fadugba_1

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, …

Member Avatar for ddanbe
0
121
Member Avatar for josechukkiri
Member Avatar for basit_3

Why the hurry? Read the texbox string Use the Split method Convert every "numeric" string to an int and put in array.

Member Avatar for Reverend Jim
0
93
Member Avatar for basit_3

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?

Member Avatar for basit_3
0
122
Member Avatar for Gudger

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.

Member Avatar for New Jack
0
290
Member Avatar for mrbrightside10

@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

Member Avatar for ddanbe
0
1K
Member Avatar for ddanbe

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 …

Member Avatar for JOSheaIV
1
778
Member Avatar for Curious Gorge

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 …

Member Avatar for Curious Gorge
0
145
Member Avatar for Syed Zeeshan Ahmed
Member Avatar for vegaseat

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 …

Member Avatar for Reverend Jim
0
669
Member Avatar for ovimanyrobin

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.

Member Avatar for David W
0
133
Member Avatar for Ebox Support
Member Avatar for vikash_5

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.

Member Avatar for Moschops
0
75
Member Avatar for Dee Wa Kar

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.

Member Avatar for AndrisP
0
109
Member Avatar for Matt Grihar

`UpdateImage()` knows nothing about an `Image` so how could it update it? You got to have more something like: `private void UpdateImage(PictureBox aPict)`

Member Avatar for JOSheaIV
0
6K

The End.