Forum : About test?
Brief description  about Online courses   join in Online courses
View  's Profile

About test?

Dear taecher..
I submited al php assignment.. please coret my assignment..
give me the test as early as possible
Asked by | Aug 2, 2010 |  Reply now
Replies (2)
View teacher siliconindia 's Profile
Hi,

All your assignments have been reviewed. Your PHP Test is also Reviewed.

Thanks

Aug 3, 2010
View sarita dubey 's Profile
uma will you please help me making classes to check prime numbers...

I wrote the following code:: but its not working..

<?php

// define class

class Calculator
{

//class variables:


var $i;
//Class member functions or methods:
function Isprime($number1)
{

$this->i=$number1;
if($this->i < 2)
{
//return false;
echo "hello";
}
for($j=2;$j<=(($this->i)/2);$j++)
{
if($this->i % $j ==0)
{
//return false;
echo "hi";
}
}
//return true;
echo "welcome";

}

}

$num1=$_POST['number1'];


//Create a class instance:
$calc = new Calculator();

//Call class methods:

$calc->Isprime($num1);

//Display output:


?>

please tell me whats wrong with this
Aug 3, 2010