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
navik [9.2K]
3 years ago
13

Need help with these 3 ez questions pls help me will mark brainiest.

Engineering
1 answer:
shusha [124]3 years ago
3 0
Yikes school tuff but c is wrong
You might be interested in
Which of the following shot pellets has the smallest diameter?
vitfil [10]
I believe i got this correct when i had an assignment with this question. It should be 7 1/2. B!
5 0
3 years ago
IN JAVA,
Citrus2011 [14]

Answer:

Explanation:

Code:

import java.io.File;

import java.io.FileWriter;

import java.io.IOException;

import java.util.Scanner;

public class Knapsack {

 

  public static void knapsack(int wk[], int pr[], int W, String ofile) throws IOException

  {

      int i, w;

      int[][] Ksack = new int[wk.length + 1][W + 1];

     

      for (i = 0; i <= wk.length; i++) {

  for (w = 0; w <= W; w++) {

  if (i == 0 || w == 0)

  Ksack[i][w] = 0;

  else if (wk[i - 1] <= w)

  Ksack[i][w] = Math.max(pr[i - 1] + Ksack[i - 1][w - wk[i - 1]], Ksack[i - 1][w]);

  else

  Ksack[i][w] = Ksack[i - 1][w];

  }

  }

     

      int maxProfit = Ksack[wk.length][W];

      int tempProfit = maxProfit;

      int count = 0;

      w = W;

      int[] projectIncluded = new int[1000];

      for (i = wk.length; i > 0 && tempProfit > 0; i--) {

         

      if (tempProfit == Ksack[i - 1][w])

      continue;    

      else {

          projectIncluded[count++] = i-1;

      tempProfit = tempProfit - pr[i - 1];

      w = w - wk[i - 1];

      }

     

      FileWriter f =new FileWriter("C:\\Users\\gshubhita\\Desktop\\"+ ofile);

      f.write("Number of projects available: "+ wk.length+ "\r\n");

      f.write("Available employee work weeks: "+ W + "\r\n");

      f.write("Number of projects chosen: "+ count + "\r\n");

      f.write("Total profit: "+ maxProfit + "\r\n");

     

  for (int j = 0; j < count; j++)

  f.write("\nProject"+ projectIncluded[j] +" " +wk[projectIncluded[j]]+ " "+ pr[projectIncluded[j]] + "\r\n");

  f.close();

      }    

  }

 

  public static void main(String[] args) throws Exception

  {

      Scanner sc = new Scanner(System.in);

      System.out.print("Enter the number of available employee work weeks: ");

      int avbWeeks = sc.nextInt();

      System.out.print("Enter the name of input file: ");

  String inputFile = sc.next();

      System.out.print("Enter the name of output file: ");

      String outputFile = sc.next();

      System.out.print("Number of projects = ");

      int projects = sc.nextInt();

      int[] workWeeks = new int[projects];

      int[] profit = new int[projects];

     

      File file = new File("C:\\Users\\gshubhita\\Desktop\\" + inputFile);

  Scanner fl = new Scanner(file);

 

  int count = 0;

  while (fl.hasNextLine()){

  String line = fl.nextLine();

  String[] x = line.split(" ");

  workWeeks[count] = Integer.parseInt(x[1]);

  profit[count] = Integer.parseInt(x[2]);

  count++;

  }

 

  knapsack(workWeeks, profit, avbWeeks, outputFile);

  }

}

Console Output:

Enter the number of available employee work weeks: 10

Enter the name of input file: input.txt

Enter the name of output file: output.txt

Number of projects = 4

Output.txt:

Number of projects available: 4

Available employee work weeks: 10

Number of projects chosen: 2

Total profit: 46

Project2 4 16

Project0 6 30

8 0
3 years ago
What are the main causes of injuries when using forklifts?
Julli [10]

Answer:

1, 3, 4, 5

Explanation:

just did it

4 0
3 years ago
The purification of hydrogen gas is possible by diffusion through a thin palladium sheet. Calculate the number of kilograms of h
Pachacha [2.7K]
Man I don't have a clue, but this stuff sounds interesting
8 0
3 years ago
A contractor is planning on including several skylights in each unit of a residential development. What type of worker would she
Sladkaya [172]

Answer:

Glazier

Explanation:

Glaziers are workers who specializes in cutting and installation of glass works.

They work with glass in various surfaces and settings, such as cutting and installing windows and doors, skylights, storefronts, display cases, mirrors, facades, interior walls, etc.

Thus, the type of worker the contractor will hire for this project is a Glazier

8 0
3 years ago
Other questions:
  • The current entering the positive terminal of a device is i(t)= 6e^-2t mA and the voltage across the device is v(t)= 10di/dtV.
    6·1 answer
  • Three return steam lines in a chemical processing plan enter a collection tank operating at a steady state at 1 bar. Steam enter
    11·1 answer
  • An escalator in a shopping center is designed to move 50 people, 75 kg each, at a constant speed of 0.6 m/s at 450 slope. Determ
    11·1 answer
  • If the pressure of a confined liquid is doubled, the volume will do what?
    12·1 answer
  • Consider two identical 86-kg men who are eating identical meals and doing identical things except that one of them jogs for 30 m
    10·1 answer
  • What does the branch of physics include
    13·1 answer
  • While you are driving you see an animal standing or walking on the side of the road. You should..
    9·1 answer
  • A 5Kw solar system may produce enough energy to power your home. a)-True b)- False
    7·1 answer
  • potential difference is the work done in moving a unit positive charge from one point to another in an electric field. State Tru
    12·1 answer
  • I should over-tighten bolts so that my creations do not fall apart.​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!