1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Pani-rosa [81]
4 years ago
6

Make a java program to enter a two-digit integer and determine if both digits are prime

Computers and Technology
1 answer:
Andre45 [30]4 years ago
8 0
Package com.java2novice.algos; public class MyPrimeNumCheck {     public boolean isPrimeNumber(int number){                 for(int i=2; i<=number/2; i++){            if(number % i == 0){                return false;            }        }        return true;    }         public static void main(String a[]){        MyPrimeNumCheck mpc = new MyPrimeNumCheck();        System.out.println("Is 17 prime number? "+mpc.isPrimeNumber(17));        System.out.println("Is 19 prime number? "+mpc.isPrimeNumber(19));        System.out.println("Is 15 prime number? "+mpc.isPrimeNumber(15));    }

You can find this code at
http://www.java2novice.com/java-interview-programs/is-prime-number/

You might be interested in
Which directory service software would be used exclusively on a windows network?.
SSSSS [86.1K]

The directory service software that would be used exclusively on a windows network is AD, an active directory service. The correct option is c.

<h3>What is directory service software?</h3>

A directory service is a group of programs and procedures that keep records of data about your business, subscribers, or both.

Microsoft created AD, a directory service solution, specifically for Windows. It offers a user interface for managing shared network objects, including users, user groups, desktop and laptop computers, devices, printers, and services.

Therefore, the correct option is c, Active Directory.

To learn more about directory service software, refer to the link:

brainly.com/question/28110834

#SPJ1

The question is incomplete. Your most probably complete question is given below:

Lightweight Directory Access Protocol (LDAP)

Novell Directory Services (NDS)

Active Directory

Acyclic-Graph Directory Structure

7 0
1 year ago
Sydney Bark is twenty-three years old, and is looking forward to celebrating her birthday on April 12. For her birthday, she sav
DochEvi [55]

Answer:

a future date

Explanation:

Because most people when trying to guess a password, start with basic ones like: 1234,abcde, password,l and dates (like their birthday). whereas, the person would never guess it was a future date like when the person would be 30 or when they are going on a trip .

5 0
3 years ago
Which of the following statements about global variables is true? 1.A global variable is accessible only to the main function. 2
Korvikt [17]

Answer:

A global variable can have the same name as a variable that is declared locally within the function.

Explanation:

In computer program, we refer to a global variable as that variable that comes with a global perspective and scope, ensuring its visibility throughout the program, except it is shadowed. The set of this kind of variable is referred to as global state or global environment. One feature of global environment is that it can have similar name as a variable declared locally within the function.

7 0
3 years ago
What piece of marketing material would be the most important when running an e-commerce website? coupons location logarithms cre
Yuri [45]
The answer would be coupons 
8 0
4 years ago
Read 2 more answers
Write a Dice Game program that generates two random dice values between 1 and 6 for you, and 2 for the computer. You get to roll
charle [14.2K]

Answer:

#include <iostream>

#include <time.h>

#include <string>

using namespace std;

int main(){

srand(time(NULL));

cout<<"Throw dice"<<endl;

int b =0;

int a=0;

a=rand()%6;

b=rand()%6;

for (int i =0;i<1;i++)

{cout<<"dice one: "<<a<<endl;}

for (int i =0;i<1;i++)

{cout<<"dice two: "<<b<<endl;}

if(a>b)

{cout<<"first dice won"<<endl;}

if(b>a)

{cout<<"second dice won"<<endl;}

else{cout<<"they are same"<<endl;

return main();

}

return 0;

}

Explanation:

/*maybe it help you it is almost done*/

6 0
3 years ago
Other questions:
  • How do Hlookup and Vlookup differ?
    5·2 answers
  • Describe the certifications developed by SANS. How are they different from InfoSec certifications like CISSP and SSCP?
    11·1 answer
  • Help<br> pls need quickly
    9·1 answer
  • Assume you're using a three button mouse.To access shortcut menus,you would
    10·1 answer
  • In query design view you can add .............. to limit the number of records shown in the resulting datasheet
    13·1 answer
  • Tim is a project manager. He is brainstorming with his team about problems that could arise during the next phase of the project
    5·1 answer
  • All of the following are personal security safeguards except ________. Select one: A. send no valuable data via email B. Use htt
    12·1 answer
  • you are pairing a bluetooth headset to a mobile device. on the device, after finding the device for pairing, what is the next st
    13·1 answer
  • What does the asterisk (*) after select tell the database to do in this query?
    5·1 answer
  • Shreya has combined all the cells in a single leftmost column in a table. Instead of identifying the category multiple times, sh
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!