Difference between revisions of "Getprime"

From Mesham
Jump to navigationJump to search
m
Line 9: Line 9:
  
 
  #include <maths>
 
  #include <maths>
  var a:=getprime(10);
+
   
var y:=getprime(a);
+
function void main() {
 +
    var a:=getprime(10);
 +
    var y:=getprime(a);
 +
};
  
 
''Since: Version 0.41b''
 
''Since: Version 0.41b''

Revision as of 14:34, 15 April 2013

Overview

This getprime(n) function will find the nth prime number.

  • Pass: An Int
  • Returns: An Int representing the prime

Example

#include <maths>

function void main() {
   var a:=getprime(10);
   var y:=getprime(a);
};

Since: Version 0.41b