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
White raven [17]
3 years ago
9

c++ If your company needs 200 pencils per year, you cannot simply use this year’s price as the cost of pencils 2 years from now.

Because of inflation the cost is likely to be higher than it is today.

Engineering
1 answer:
Gala2k [10]3 years ago
4 0

Answer:

<em><u>note:</u></em>

<em><u>please find the attached code</u></em>

You might be interested in
Your Java program will be reading input from a file name strInput.txt. Each record contains String firstname String lastName Str
stiks02 [169]

Answer:

The program requires that you have the specified input files and it reads from each file at a time and processes salary in digits, states the city, state and bonus with respective first and last name as requested in the question. Note that you must have access to the mentioned output files for the program to work properly. Below is the java version of the program.

import java.io.File;

import java.io.FileNotFoundException;

import java.io.PrintWriter;

import java.util.Scanner;

class Driver

{

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

{

Scanner sc = new Scanner(new File("strInput.txt"));

PrintWriter pd = new PrintWriter(new File("strOutputD"));

PrintWriter prf = new PrintWriter(new File("strOutputRF"));

String firstname = "", lastname = "", strSalary = "", status = "", cityState = "", city = "", state = "";

double salary = 0, bonus = 0;

int incorrectRecords = 0;

int dRecords = 0;

int fRecords = 0;

while(sc.hasNextLine())

{

firstname = sc.next();

lastname = sc.next();

strSalary = sc.next();

status = sc.next();

cityState = sc.next();

if(!status.equals("D") && !status.equals("F"))

{

System.out.println("Records is neither D nor F. Skipping this...");

incorrectRecords++;

continue;

}

else if(status.equals("D") || status.equals("F"))

{

char c = ' ';

int i = 0;

for(i=0; i<strSalary.length() && c != '.'; i++)

{

c = strSalary.charAt(i);

if(!Character.isDigit(c))

{

System.out.println("Char at position " + (i+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

}

if(c == '.')

{

if(i+1 == strSalary.length()-1)

{

if(!Character.isDigit(strSalary.charAt(i)))

{

System.out.println("Char at position " + (i+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

if(!Character.isDigit(strSalary.charAt(i+1)))

{

System.out.println("Char at position " + (i+1+1) + " in salary is not a digit");

incorrectRecords++;

continue;

}

}

else

{

System.out.println("Period is in the wrong position. Expected at " + (strSalary.length()-3) + " but found at " + (i+1));

continue;

}

}

city = cityState.split(",")[0];

state = cityState.split(",")[1];

salary = Double.parseDouble(strSalary);

if(status.equals("D"))

{

bonus = salary * 0.125;

dRecords++;

pd.write(firstname + " " + lastname + " " + status + " " + salary + " " + bonus + " " + city + " " + state);

}

else

{

bonus = salary * 0.18;

fRecords++;

prf.write(firstname + " " + lastname + " " + status + " " + salary + " " + bonus + " " + city + " " + state);

}

}

}

System.out.println("No of D records : " + dRecords);

System.out.println("No of F records : " + fRecords);

System.out.println("No of incorrect records : " + incorrectRecords);

}

}

6 0
3 years ago
What should i do to my nissan 350z, twin charge it or have twin turbos, to twin turbos with a super charger? i want it to be ove
bulgar [2K]

Answer:

A

Explanation:

It just makes sense

4 0
3 years ago
PLEASE HELP QUICK!!
ivolga24 [154]

R01= 14.1 Ω

R02=  0.03525Ω

<h3>Calculations and Parameters</h3>

Given:

K= E2/E1 = 120/2400

= 0.5

R1= 0.1 Ω, X1= 0.22Ω

R2= 0.035Ω, X2= 0.012Ω

The equivalence resistance as referred to both primary and secondary,

R01= R1 + R2

= R1 + R2/K2

= 0.1 + (0.035/9(0.05)^2)

= 14.1 Ω

R02= R2 + R1

=R2 + K^2.R1

= 0.035 + (0.05)^2 * 0.1

= 0.03525Ω

Read more about resistance here:

brainly.com/question/17563681

#SPJ1

5 0
2 years ago
15- Vipsana's Gyros House sells gyros. The cost of ingredients (pita, meat, spices, etc.) to make a gyro is $2.00. Vipsana pays
sineoko [7]
D is a great answer
4 0
3 years ago
The flowrate through a rectangular channel is 20 cfs. The upstream width of the channel is 10 ft, and the depth of the water in
Liula [17]

To solve this problem we will use the Froude number that relates the Forces of Inertia with the Forces of Gravity. There will be jump in the downstream only if Froude Number (Fr) is greater than 1 at upstream. Our values are given as,

Q = 20cfs\\w= 10ft\\D= 1ft

Then the velocity would be:

V = \frac{Q}{wD}V = \frac{20}{10*1}V = 2ft/s

The number of Froude is given as,

Fr = \frac{V}{gD}^{1/2}

Where,

V = Velocity

g = Gravity

D = Diameter

Replacing we have that

Fr = \frac{2}{32.2}^{1/2}\\Fr = 0.352\\Fr

There will be no Jump, correct answer is B.

5 0
3 years ago
Other questions:
  • A hypodermic syringe is used to apply a vaccine. If the plunger is moved forward at the steady rate of 20 mm/s and if vaccine le
    14·1 answer
  • Which of the following are rights that workers have under OSHA
    14·2 answers
  • Question 44
    8·1 answer
  • Which atom bond in atomic interaction combines electrons, filling its valence zone a) Van der Vaals bond; b) a covalent bond; c)
    8·1 answer
  • Tech A says that proper footwear may include both leather and steel-toed shoes. Tech B says that when working in the shop, you o
    15·1 answer
  • Technician A says that in a circuit that has 3 Ohms of resistance and operates on 12 volts, the amperage must be 4 amps. Technic
    10·1 answer
  • One of the flaws in the engineers' reasoning for galloping gertie's design was that they attributed prior failures of suspension
    12·1 answer
  • Decisions which are concerned with policy matters and exercise fundamental influence on the Organizational decisions. Personal d
    10·1 answer
  • 1. Safety goggles, glasses, or face shields must be
    6·2 answers
  • 2.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!