Programming

Programming questions? Ask a programmer for answers ASAP

Connect one-on-one with {0} who will answer your question

n 7 0 out of 20...

n 7

0 out of 20 pointsWrite a program that prompts the user to specify the coefficients of a quadratic equation and then calculates the roots of the quadratic equation.It prints out the roots of the quadratic equation. The mark rubric only applies to compilable code.The program must use an array to store the coefficients of a quadratic equation. [1]

The program obtains the coefficients of a quadratic equation from the command line. [1]

If the coefficient is 0 then specify this in the command line, for example quadratic.exe 1 0 -4. [1]

The program must check that the correct number of input arguments are entered and display an error message if the incorrect number of arguments are entered. [2]

The program must use a for loop to store the coefficients in an array. [4]

The program must define and call a function called calc_roots with the coeeficient array as input arguments. The function returns no value. Define local variables. [2]

The function calc_roots must calculate the roots of the quadratic equation. [3]

USe if statements to check if the calculated root values are negative and then display the root as either (x -r) or (x + r), where r is the calculated root. [4]

The program structure and use of libraries is correct. [2]

0 out of 20 pointsWrite a program that prompts the user to specify the coefficients of a quadratic equation and then calculates the roots of the quadratic equation.It prints out the roots of the quadratic equation. The mark rubric only applies to compilable code.The program must use an array to store the coefficients of a quadratic equation. [1]

The program obtains the coefficients of a quadratic equation from the command line. [1]

If the coefficient is 0 then specify this in the command line, for example quadratic.exe 1 0 -4. [1]

The program must check that the correct number of input arguments are entered and display an error message if the incorrect number of arguments are entered. [2]

The program must use a for loop to store the coefficients in an array. [4]

The program must define and call a function called calc_roots with the coeeficient array as input arguments. The function returns no value. Define local variables. [2]

The function calc_roots must calculate the roots of the quadratic equation. [3]

USe if statements to check if the calculated root values are negative and then display the root as either (x -r) or (x + r), where r is the calculated root. [4]

The program structure and use of libraries is correct. [2]

Show More

Show Less

Was this answer helpful?

Describe your issueThe assistant will guide you

Chat 1:1 with a programmerLicensed Experts are available 24/7

100% satisfaction guaranteeGet all the answers you need

Related Programming Questions

Write c++ program to merge two files, npthing else, asap if

write c++ program to merge two files JA: Have you begun working on a solution? What C++ code do you have so far? Customer: npthing else JA: What are the full requirements for this task? How soon do yo… read more

Can anyone do this if not it's ok. need by saturday. Part 1:

Can anyone do this if not it's ok. need by saturday.Part 1: The Store 5) The store is represented as a simple menu system with the following options: a. Buy Weapon b. Check Balance c. Exit Store 6) Th… read more

I am having issues doing a homework assignment java class, I

I am having issues doing a homework assignment for my java class, I am not quite sure how to do it. • Name your class Quadratic • Your class should have ONLY the following instance variables: double c… read more

Exercise 3.9/102 How do you generate a random integer i such

Exercise 3.9/102 How do you generate a random integer i such that 0≤ i < 20? How do you generate a random integer i such that 10 ≤ i < 20? How do you generate a random integer i such that 10 ≤ i… read more

For LogicPro only: Edit, compile, and run using C: The point

For LogicPro only:Edit, compile, and run using C: The point of this program is to learn how to use commandline input and how to use an array of pointers to functions. Write a calculator for positive, … read more

Given a quadratic equation ax2+bx+c = 0, write a function

Given a quadratic equation ax2+bx+c = 0, write a function roots(a, b, c) that returns the two roots of the equation. The returned roots should be float objects when the roots are real, otherwise the f… read more

I have to write C++ program, involving a polynomial of form

I have to write C++ program, involving a polynomial of form ax^2 + bx + c = 0, that finds the the roots of various quadratics designed to run in batch mode. I'm lost help please… read more

CS150 spring 2012 Project 2 Solving Quadratic Equations

CS150 spring 2012 Project 2 Solving Quadratic Equations Due: Electronic copy of your .cpp file no later than Friday 2/24/2012 at 11:59 p.m. Important: All projects are to be completed individually; du… read more

I need to get the math expressions to turn blue - having trouble

I need to get the math expressions to turn blue - having trouble getting the syntax right I guess to get this to happen - I'm using the required namespacer and prefix - so here is the XML code and the… read more

A quadratic equation is a second-degree polynomial in a single

A quadratic equation is a second-degree polynomial in a single variable and can be described using y = a*x2 + b*x + c, where x is the single variable, y represents the value of the polynomial, and a, … read more

Quadratic Equation Given a quadratic equation in standard

Quadratic Equation Given a quadratic equation in standard form, ax2 + bx + c = 0, solutions for x can be determined using the quadratic formula, . The values of x can be real or complex. The discrimin… read more

Exercise 1 Resistor Class and Pointers (20 points) Objective

Exercise 1: Resistor Class and Pointers (20 points) Objective: Create a C++ console application that utilizes the core concepts of inheritance and pointers by creating a class and a program that tests… read more

1) a) Write a single C++ statement that prints too many”

1) a) Write a single C++ statement that prints “too many” if the variable count exceeds 100, using an if statement and the conditional expression operator. b) Write and test a program that solves quad… read more

1) Write a program that raises an integer to a positive integer

1) Write a program that raises an integer to a positive integer power. Call the function x_to_the_n taking two integer arguments x and n. Have the function return a long int, which represents the resu… read more

i have to write a function program that is describesd as wright

i have to write a function program that is describesd as wright a program to read 3 numbers from an input(IN.TXT) file (1,-5,6 ) , these are the coefficients of a quadratic equation my job is to use q… read more

There are four problems I need done 1. Write a void function

There are four problems I need done: 1. Write a void function that uses two nested for loops and the modulus (%) operator to detect and print to standard output the first n prime integers. Recall that… read more

Write a function that will calculate and display the real roots

Write a function that will calculate and display the real roots of the quadratic equation ax2 + bx + c = 0 Using the quadratic formula x = -b +- square_root(b2 – 4ac ) 2a Assume that a, b, and c are f… read more

Hi I need help on this c++ qn. Given a quadratic equation

Hi I need help on this c++ qn. Given a quadratic equation in standard form, ax2 + bx + c = 0, solutions for x can be determined using the quadratic formula, . The values of x can be real or complex. T… read more

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.

JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.

Web sites like justanswer.com/legal

...leave nothing to chance.

...leave nothing to chance.

Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.

Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.

I will tell you that...the things you have to go through to be an Expert are quite rigorous.

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

New York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

Los Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

Hesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

Kernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

Woodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

Elkton, Maryland

< Previous | Next >

LogicPro

Computer Software Engineer

10,415 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

Computer Software Engineer

1,170 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

The-PC-Guy

Software Engineer

940 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

Rafael Martins

Computer Software Engineer

449 satisfied customers

Desktop, Mobile and Web Developer. 10+ years of experience. Creative solutions provider.

Ramesh Patil

Computer Software Engineer

406 satisfied customers

MCA, 3+ years of experience in Asp.Net, C#, SSIS, VB.Net, Ms-SqlServer2005, MySql, Javascript,

Arty

Computer Software Engineer

377 satisfied customers

15+ years of programming, C, C++, Java, PHP, awk, ruby, shell, ASM, Forth, Raptor, M.A.R.I.E, Excel

< Previous | Next >

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.