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

I have an Interview about Guidewire claimcenter,so could you provide any info regd it?.I would really appreciate any kind of help- email at hvshah2001@gmail.com

1970


What is bottom-up approach?

680


For any web application, what are the possible login features that should be tested?

808


Describe to me what you see as a process. Not a particular process, just the basics of having a process.

1719


plz send the test scenarios and test cases for "user name should contain 4 to 8 chars and they should have only vowels"

1739






A defect which could have been removed during the initial stage is removed in a later stage. How does this affect cost?

1013


Can you explain requirement traceability and its importance?

659


What is AGP?what is setup.inf?What are the ways to install driver?

1790


What is coverage and what are the different types of coverage techniques?

654


What is difference between Build, Version and Release

1685


how to indentify memory leakages after the build

1641


what is a horizontal and vertical matrix explain with examples

2117


What does a manual tester need to become proficient with db testing?

696


Which test cases are written first: white boxes or black boxes?

797


Can any tell me how a clinical data management system is tested? what are the test scenarios? what are the test cases? work flow.

1428