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
svetlana [45]
3 years ago
8

Given an ofstream object named output, associate it with a file named yearsummary.txt for output in a way that truncates (erases

) any existing data in the file.
Computers and Technology
1 answer:
timurjin [86]3 years ago
4 0

Answer:

The answer is output.open("yearsummary.txt", ios::trunc)

Explanation:

Given an ofstream object named output, associate it with a file named yearsummary.txt for output in a way that truncates (erases) any existing data in the file. The file is output.open("yearsummary.txt", ios::trunc)

You might be interested in
All of the following are extra precautions you can take to secure a wireless network EXCEPT ________. change your network name (
Bingel [31]

Answer:

Enable SSID broadcast

Explanation:

8 0
3 years ago
What is the compression rate? The compression rate says by how much the text was compressed from the original as a percentage. D
gogolik [260]

Answer and Explanation:

  • Data compression ratio is characterized as the proportion between the uncompressed size and packed size.  
  • Data compression ratio can spare stockpiling limit, accelerate record move, and decline costs for capacity equipment and system data transfer capacity.  
  • The Compression rate is 43 bytes and it is viewed as useful for the very truth that it limits the information put away on the PC, in this manner opening up space for more data
5 0
3 years ago
Datta Computer Systems is considering a project that has the following cash flow data. What is the project's IRR? Note that a pr
Afina-wow [57]

Answer:

IRR is 20.64%

Explanation:

The internal rate of return is the rate of return on the project where the present of values of the  cash inflows over the three years equals the cash outflow in year zero.

It is simply a breakeven rate of return on investment project.

Using a spreadsheet approach,the formula for IRR is given below:

=IRR(values)

the values are the cash inflows and outflow in the relevant years.

IRR=20.64% as in the attached file

This shows that none of the five options is correct

Download xlsx
4 0
3 years ago
Which statement is written correctly?
ASHA 777 [7]

Answer:

B.

Explanation:

In Javascript, the if should have a condition attached to it with parenthesis and curly braces.

5 0
3 years ago
Use java to write a program that finds the real rooots of the quadratic equation ax^2+bx+c using the quadratic formula.
Artyom0805 [142]

Answer:

The program to this question can be given as:

Program:

//import package.

import java.util.*;

public class quadratic           //define class.

{

public static void main(String[] args) //define main method

{

double a,b,c;          //decalre varibale.

Scanner in=new Scanner(System.in);       //creating scanner class object.

System.out.print("Enter coefficient a: ");          //print message.

a=in.nextDouble();                      //user input.

System.out.print("Enter coefficient b: ");

b=in.nextDouble();

System.out.print("Enter coefficient c: ");

c=in.nextDouble();

solve(a,b,c);                //calling function.

}

public static void solve(double a,double b,double c)      //define method.

{

double dis;  //define variable.

dis=b*b-4*a*c;

System.out.println("The roots of "+a+"x^2 + "+b+"x + "+"("+c +")" +" are:");

//conditional statement.

if(a==0)    //by definition-denominator will be 0

{

System.out.println("Error: no real roots exist");

}

else if(dis<0)         //by definition, negative discriminant means roots are imagenary

{

System.out.println("Error: no real roots exist\n");

}

else                          //get the 2 roots

{

dis=Math.sqrt(dis);

System.out.println("first root= "+(-b+dis)/(2*a)+"\nSecond root= "+(-b-dis)/(2*a));

}

}

}

Output:

Enter coefficient a: 6

Enter coefficient b: 11

Enter coefficient c: -35

The roots of  6.0x^2 + 11.0"x +(-35)  are:

first root= 1.666666666667

Second root=-3.5

Explanation:

In the above program firstly we import packages for the user input. Then we define class. In this class we define a main method and function i.e solve function. In the main method we create the scanner class object and input the value from the user and pass the value to the function and call the function. In the solve function, we use the conditional statement that checks any of the input values is not equal to 0. if any value is equal to 0 it prints error message otherwise it prints the quadratic value and its roots.

8 0
3 years ago
Other questions:
  • 2. Using the Book class developed in HW 4, write an application, BookLibrary, that creates a library (array) of up to 10 books a
    12·1 answer
  • Which type of firewall policy calls for a firewall to deny all traffic by default?
    13·1 answer
  • . Write a statement that throws an IllgalArgumentException with the error message Argument cannot be negative.
    11·1 answer
  • When you search google for​ dishwashers, you are likely to see a number of inconspicuous ads for​ advertisers, including product
    11·1 answer
  • ​Lara is the chief editor of "Laughter and Life," an online magazine. Lara has assigned Jenny the task of redesigning the magazi
    5·1 answer
  • Your site has a self service salad bar with a fresh greens mixture, two fresh vegetable selections and 4 salad dressings display
    12·1 answer
  • Aaron is staying at a hotel that charges $100 per night plus tax for a room. A tax of 8% is applied to the room rate per day and
    10·1 answer
  • You are working on a graphical app, which includes multiple different shapes. The given code declares a base Shape class with an
    15·1 answer
  • Direction: Write True on the line if the statement is correct. Write False if the statement is incorrect. 1. All objects are com
    13·2 answers
  • when I turn on my pc using a graphics card, it does give video, and everything is normal, but when I try to turn on my pc with t
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!