write the test cases on prime number with result?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

On login window for username and password auto populated field means what !

1252


What is the difference between load and stress testing?

717


in the account there is 10,000 rupees and i entered 20000, in this case how will you test the application

1256


What is a maturity level?

732


user id @ yahoo.com (or) yahoo.co.in (or) gmail.com.... etc

1930






What is application programming interface (api)?

647


What will be the testcase for a uniquely generated number in the application?? i mean to say is, how will i conform the application is generating a unique value.... please do answer...

1734


What r the things,u prefer and prepare before starting testing?

1773


can any one explain me briefly erp pharma project including all modules,like how to tell this project in interview in terms of s/w testing

1655


What r the functional testing u perform?

1652


What is difference between Build, Version and Release

1681


What is Web testing & which action we take at the time of Web Testing?

1470


Which are the standards for software test plans?

675


how is market for testing in banglore,chennai,pune,delhi?

1708


ANY ONE HAS ATTENDED THE INTERVIEW FOR WIT INNOVATION P LTD? THEN KINDLY LET ME KNOW ABOUT THE INTERVIEW PROCESS AND QUESTIONS ASKED.

1740