Computer Progammers? HELP NEEDED (C#)

Originally Posted by ebpo

I can't remember C# (or Java for that matters), but let me take a shot at it in PHP, all you got to do is translate
wink.gif


Just to be sure, you want to know how much 5! does for example? This is how I would do it, in PHP again

function factorial($number){


$result = 1
if($number < 0){ // Only works with positive number;

$result = -1; // Use -1 to display an error message or something

}elseif($number == 0){

$result = 1;

}else{

for($i = $number; $i < 1; $i--){ // We will stop decreasing at 1, because we already included the *1 on the first occurence

$result = $result * $i;

}

}

return $result;

}
This should work, yes, SHOULD, i didn't take time to proofread



Another way which would b a little simpler:

Function factorial(number){

     loop until number = 1{                                     //Create a loop that runs until the number equals 1 since you do not need to multiply by 1
          ((number) * (number--)) == baseresult      
          baseresult + result == result
     }
return(result)

I know its not properly designed and none of the variables declared but u should get the jist of the algorithm
 
Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
 
Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
 
Originally Posted by Control Are

Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
Just going to grab a book.
Looked through one at BAM doesn't really look all that bad
 
Originally Posted by Control Are

Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
Just going to grab a book.
Looked through one at BAM doesn't really look all that bad
 
Originally Posted by omgitswes

Originally Posted by Control Are

Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
Just going to grab a book.
Looked through one at BAM doesn't really look all that bad
get some e-books online!
 
Originally Posted by omgitswes

Originally Posted by Control Are

Originally Posted by omgitswes

interesting. I hated Java with a passion, so never bothered with C# because my prof said it's pretty much the same.

Still need to teach myself Python whenever I get enough free time

I need to do the same. Python, Perl or some other type of shell scripting.

Are you just grabbing some books and going through the pages or are there online tutorials/courses?
Just going to grab a book.
Looked through one at BAM doesn't really look all that bad
get some e-books online!
 
I know Java, VB, HTML, and a little bit of everything else. What exactly the need for the program? I cant lead you through the syntax but I can atleast give you psuedo code.
 
I know Java, VB, HTML, and a little bit of everything else. What exactly the need for the program? I cant lead you through the syntax but I can atleast give you psuedo code.
 
Back
Top Bottom