Click here to Skip to main content
15,896,278 members
Home / Discussions / C#
   

C#

 
Questionhow to split input integer variable Pin
arungracy22-Jan-10 9:15
arungracy22-Jan-10 9:15 
AnswerRe: how to split input integer variable Pin
loyal ginger22-Jan-10 9:22
loyal ginger22-Jan-10 9:22 
GeneralRe: how to split input integer variable Pin
Som Shekhar22-Jan-10 9:39
Som Shekhar22-Jan-10 9:39 
AnswerRe: how to split input integer variable Pin
#realJSOP22-Jan-10 10:23
professional#realJSOP22-Jan-10 10:23 
GeneralRe: how to split input integer variable Pin
Luc Pattyn22-Jan-10 10:46
sitebuilderLuc Pattyn22-Jan-10 10:46 
GeneralRe: how to split input integer variable Pin
#realJSOP22-Jan-10 11:05
professional#realJSOP22-Jan-10 11:05 
AnswerRe: how to split input integer variable [modified] Pin
#realJSOP22-Jan-10 10:36
professional#realJSOP22-Jan-10 10:36 
GeneralRe: how to split input integer variable [modified] Pin
Luc Pattyn22-Jan-10 11:32
sitebuilderLuc Pattyn22-Jan-10 11:32 
you have silently assumed the "integer" would fit in an int, in which case I agree with your code.
For larger variables, you would need long and Math.Pow() would lack the accuracy to get it right in all cases...

So the next homework assignment should be: find the smallest positive long value for which JSOP's code fails. Where is the new article category? Poke tongue | ;-P

[ADDED]
Shall we call the final Sort a typo?
[/ADDED]

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]


modified on Friday, January 22, 2010 5:53 PM

GeneralRe: how to split input integer variable Pin
#realJSOP22-Jan-10 12:46
professional#realJSOP22-Jan-10 12:46 
AnswerRe: how to split input integer variable [modified] Pin
#realJSOP23-Jan-10 2:16
professional#realJSOP23-Jan-10 2:16 
AnswerRe: how to split input integer variable Pin
#realJSOP23-Jan-10 5:04
professional#realJSOP23-Jan-10 5:04 
Questionget data from SSRS report Pin
Mohamed El-Wehishy22-Jan-10 7:20
Mohamed El-Wehishy22-Jan-10 7:20 
QuestionA Dialog bug (Edited) Pin
Muammar©22-Jan-10 7:04
Muammar©22-Jan-10 7:04 
AnswerRe: A Dialog bug (Edited) Pin
Som Shekhar22-Jan-10 7:20
Som Shekhar22-Jan-10 7:20 
GeneralRe: A Dialog bug (Edited) Pin
Muammar©22-Jan-10 20:10
Muammar©22-Jan-10 20:10 
GeneralRe: A Dialog bug (Edited) Pin
Som Shekhar22-Jan-10 20:16
Som Shekhar22-Jan-10 20:16 
AnswerRe: A Dialog bug (Edited) Pin
loyal ginger22-Jan-10 7:26
loyal ginger22-Jan-10 7:26 
GeneralRe: A Dialog bug (Edited) Pin
Ravi Bhavnani22-Jan-10 7:47
professionalRavi Bhavnani22-Jan-10 7:47 
GeneralRe: A Dialog bug (Edited) Pin
loyal ginger22-Jan-10 8:08
loyal ginger22-Jan-10 8:08 
GeneralRe: A Dialog bug (Edited) Pin
Ravi Bhavnani22-Jan-10 8:11
professionalRavi Bhavnani22-Jan-10 8:11 
GeneralRe: A Dialog bug (Edited) Pin
Muammar©22-Jan-10 20:30
Muammar©22-Jan-10 20:30 
GeneralRe: A Dialog bug (Edited²) Pin
Ravi Bhavnani23-Jan-10 5:16
professionalRavi Bhavnani23-Jan-10 5:16 
GeneralRe: A Dialog bug (Edited) Pin
Ravi Bhavnani23-Jan-10 5:23
professionalRavi Bhavnani23-Jan-10 5:23 
GeneralRe: A Dialog bug (Edited) Pin
Muammar©23-Jan-10 5:46
Muammar©23-Jan-10 5:46 
GeneralRe: A Dialog bug (Edited) Pin
Ravi Bhavnani23-Jan-10 5:50
professionalRavi Bhavnani23-Jan-10 5:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.