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
Karo-lina-s [1.5K]
3 years ago
12

In Java, Create a two part program. The first takes a user inputted number and lists the factors. The second, lists all the prim

e numbers up to the integer the user inputted
Computers and Technology
1 answer:
crimeas [40]3 years ago
3 0

Answer:

looooooooooooooollllllllollll

Explanation:

your phone number please give

You might be interested in
Write a function which sorts the queue in order from the smallest value to the largest value. This should be a modified version
PilotLPTM [1.2K]

Answer:

#include <iostream>

using namespace std;

void swap(int *a,int *b){    //function to interchange values of 2 variables

   int temp=*a;

   *a=*b;

   *b=temp;

}

void sort(int queue[],int n)

{

   int i,j;

   for(i=0;i<n;i++)      //to implement bubble sort

   {

       for(j=0;j<n-i-1;j++)

       {

           if(queue[j]>queue[j+1])

               swap(queue[j],queue[j+1]);    //to swap values of these 2 variables

       }

   }

}

int main()

{

   int queue[]={6,4,2,9,5,1};

   int n=sizeof(queue)/4;  //to find length of array

   sort(queue,n);

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

       cout<<queue[i]<<" ";

   return 0;

}

OUTPUT :

1 2 4 5 6 9

Explanation:

In the above code, Queue is implemented using an array and then passed to a function sort, so that the queue can be sorted in ascending order. In the sort function, in each pass 2 adjacent values are compared and if lower index value is greater than the higher one they are swapped using a swap function that is created to interchange the values of 2 variables.

7 0
3 years ago
Place the steps in order for adding an additional email account in outlook
Zielflug [23.3K]

Answer:

Give Thanks to JessicaRoberts715

1. Click the file tab

2. Click the add account button

3. Type the account information

4. Outlook will auto-configure the account

5. A new account appears in the folder list

6 0
2 years ago
Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per ga
aliya0001 [1]

Answer:

public class TestAutomobiles {

   public static void main(String args[]) {

     Automobile obj = new Automobile(1, "Wolkswagen", "Golf", 2007, "GR1GR", 20, 120, "Grey");

  System.out.println("Initial Speed: " + obj.getSpeed());

  System.out.println("Current Speed with acceleration 100: " + obj.accelerate(100));

  System.out.println("Current Speed after using brake : " + obj.brake());

   }

}

class Automobile {

    private int idNumber, year, milesPerGallon, speed = 0;

    private String model, vinNumber, make, color;

   

    public void setIdNumber(int idNumber){

       if (idNumber >= 0 && idNumber <= 9999)

           this.idNumber = idNumber;

       else this.idNumber = 0;

    }

    public void setModel(String model){

        this.model = model;

    }

    public void setYear(int year){

       if (year >= 2000 && year <= 2017)

           this.idNumber = idNumber;

       else this.year = 0;

    }

    public void setVinNumber(String vinNumber){

        this.vinNumber = vinNumber;

    }

    public void setMilesPerGalon(int milesPerGallon){

       if (milesPerGallon >= 10 && year <= 60)

           this.milesPerGallon = milesPerGallon;

       else this.milesPerGallon = 0;

    }

    public void setSpeed(int speed){

        this.speed = speed;

    }

    public void setMake(String make){

        this.make = make;

    }

    public void setColor(String color){

        this.color = color;

    }

    public int getIdNumber(){return idNumber;}

    public String getModel(){return model;}

    public int getYear(){return year;}

    public String getVinNumber(){return vinNumber;}

    public int getMilesPerGallon(){return milesPerGallon;}

    public int getSpeed(){return speed;}

    public String getMake(){return make;}

    public String getColor(){return color;}

   

   public int accelerate() {

       setSpeed(speed + 5);

       return speed;

   }

   public int brake() {

       setSpeed(speed - 5);

       return speed;

   }

   public int accelerate(int s) {

       setSpeed(speed + s);

       return speed;

   }

   public int brake(int s) {

       setSpeed(speed - s);

       return speed;

   }

   

    public Automobile(int idNumber, String make, String model, int year, String vinNumber, int milesPerGallon, int speed, String color){

       setIdNumber(idNumber);

       setModel(model);

       setYear(year);

       setVinNumber(vinNumber);

       setMilesPerGalon(milesPerGallon);

       setSpeed(speed);

       setMake(make);

       setColor(color);

    }

}

Explanation:

Required <em>variables</em> are declared as private members.

Their <em>setters</em> and <em>getter</em> are created.

Two <em>accelearate</em> and two <em>break</em> methods are created.

One <em>constructor</em> taking all variables as parameter is created.

In the main, I tested a few functions to check if they work properly.

4 0
3 years ago
In excel office How to create spreadsheets?​
Alenkasestr [34]

Answer:

Step 1: Open MS Excel. Step 2: Go to Menu and select New >> click on the Blank workbook to create a simple worksheet. OR – Just press Ctrl + N: To create a new spreadsheet. Step 3: Go to the spreadsheet work area.

8 0
3 years ago
Stan’s assignment is to print a three-dimensional image on a piece of paper. Which printing technique should he use?
Zigmanuir [339]

Answer:

to print a three-dimensional image on a piece of paper he should use autocad

8 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to
    5·1 answer
  • For a panoramic photograph, you will more than likely want to control the exposure of the photograph yourself rather than lettin
    11·1 answer
  • What is the protocol that is used between a web browser and web server at the transportation layer?
    13·1 answer
  • You are creating a presentation and you have come to the last slide. You still have more information to add. What should you do?
    7·1 answer
  • Write a program that takes paragraph from the user and prints all unique words in that paragraph using strings in c++
    5·1 answer
  • With _________, users will receive recommendations for items liked by similar users.
    9·1 answer
  • A software is made from​
    10·1 answer
  • Fwee Pwoints Fwor You
    11·2 answers
  • Meera has created a small program in Python. She wants to store elements of the same data type in an organized
    7·1 answer
  • The process of arranging the item of a column in some sequence or order is known as?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!