Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write the test cases on prime number with result?

Answers were Sorted based on User's Feedback



write the test cases on prime number with result? ..

Answer / babitha

Precondition:let the prime no be n
case1: expected o/p (prime no)result
divide the no n by 1 remainder=0 pass
divide the no n by n remainder=0 pass

divide the no n by 2 remainder!=0 pass
.
.
divide the no n by upto n-1 and if remanider not equal zero
then it is a prime no.

Is This Answer Correct ?    43 Yes 15 No

write the test cases on prime number with result? ..

Answer / guest

Testcase ID test condition Result
1 1 true
2 3 true
3 4 false
4 5 true

Is This Answer Correct ?    24 Yes 15 No

write the test cases on prime number with result? ..

Answer / guest

-field area should take only numeric value
-number should not contain fraction or decimal
-number should not contain any special character
-number should be divisible by 1
-if number is divisible by other than 1 then reminder should
be 1

Is This Answer Correct ?    6 Yes 3 No

write the test cases on prime number with result? ..

Answer / pavithramadhesh

import java.util.Scanner;

public class prime {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Enter a Number: ");
int a=sc.nextInt();
if(((a/a)==1) && ((a/1)==a)){
System.out.println(a+" is Prime Number");
}else {
System.out.println(a+" is Not Prime Number");
}
}
}

Is This Answer Correct ?    2 Yes 0 No

write the test cases on prime number with result? ..

Answer / md.mosaj gohar

- chech if the number is not a decimal no.
- check if the number is not of the from p/q
- check if the number is not a negative no.
- if the number is a natural number a greater than 6 then,
-if it can be converted to the form 6k-1or
6k+1,then it is prime no.else not.
- for natural nos. less than 6: 2,3 7 5 are prime nos. to
be taken as granted.

Is This Answer Correct ?    4 Yes 3 No

write the test cases on prime number with result? ..

Answer / surya gandepalli

for input = 1 , Ouput: should be "Not a Prime Number"

Prime Number(Definition): A number Greater Than 1 is called
a prime number, if it has exactly two factors, namely 1 and
the number itself.

so check with the boundary values.
({INPUT},OUTPUT ) = ({0,1,4}, {NOT PRIME})
({INPUT},OUTPUT ) = ({2,3,5}, {is PRIME})
{Destructive INPUT}=(Type Special Characters),(Copy Past
Special Characters from a Note Pad document Using Mouse ))

0 (Zero is the only Whole Number which is not a natural number)
1

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More Manual Testing Interview Questions

Im a 2005 graduate i did testing course from a reputeted institute but was nt able to get a job as a fresher so i got an fack certificate in tat i included 2 prjs based on web site testin cud ne one tell me wat will be questions cud be fired for me as a 2yrs exp in manual testing .. ill be great full of all urs

6 Answers  


what are the typical problems in web testing?

0 Answers  


what is port testing and mutation testing?

3 Answers  


what is Persistent Testing.

3 Answers   Tera Informatics,


how to write test cases for fibonacii series

2 Answers   Impetus,


what are 5 common problems in software development process?

14 Answers  


exact definition of defect tracking?

1 Answers  


which fields comes under SRS?

2 Answers   Wipro,


what is database teesting?

4 Answers  


What is Static Testing and Static Test Technics?

2 Answers  


what is test strategy?

11 Answers  


I need your help, actually am facing lots of problem in interview am not able to answer in right way what ever questions asked about project. Could you please answer few questions? You must have seen the project I have mention as current project so please help on this, tell me how to explain project in details am prepare on HR module but don’t know how to explain it properly. If you can send me few documents like SRS, and few test case that will help me to get the clear picture, and want ask u what is tier1, tier2, and tier3 in project.

0 Answers  


Categories