473,671 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

program solve quadratic equation inc++

3 New Member
i want a fragment of code that accepts the coefficient of quadratic equation from user and calculate the eqt'n.
Sep 18 '06 #1
1 4639
D_C
293 Contributor
You are in luck.
Sep 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7590
by: parisgoblet | last post by:
hi, i'm a freshman with c++,i got a question from my assignment,does someone could give me some ideas for that. Given the following prototype of a function that solves the roots of a quadratic equation of the form ax2 + bx + c: Ret_type fn_name(formal param list); explain the nature of each of the parameter-passing mechanisms used and give a suitable example of code to call the function fn_name. Your answer should contain all necessary...
5
2236
by: CoreyWhite | last post by:
It is possible to use martingale probability theory to beat some games of chance. In a fair game of coin toss, where the odds reach an equilibrium of 50/50 chain reactions do occur. This can be explained using martingale probability theory, but in simpler terms it only shows an example of how order emerges out of chaos. Example: One player has 3 pennies, and another player has only 1 penny. A fair coin is tossed every round to determine...
1
1421
by: jwatson | last post by:
Write a program to find the roots of quadratic equation. User will key the "a","b","c", for the equation ax*x+b*x+c = 0. formula given as x = (-b(+)(-) sqrt(b*b-4ac)/2a. Prog1: Only find the real roots or identify the complex roots. Prog2:Find the roots or the complex roots. Guys.. anyone willing to help on this. i am pretty weak at maths...Thanks.
3
2497
by: floofy | last post by:
Hello all! First I would like to thank all of those who helped me regarding my first assignment...I'm much better with my semicolons now. A couple assignments later...I'm having problems again. I'm supposed to create a very simple C++ program calculating the answers to a quadratic equation in form a(x^2) + b(x) + c. I thought i had no problems typing the code, but when I test 1, 2 and 3 for a, b, and c variables respectively, I get "-1.#IND"...
6
14839
by: Trev17 | last post by:
Hello, I am new to C++ and i have tried for several hours to make a program my teacher has given me as a lab. Here is the Lab question: the roots of the quadratic equation ax^2 + bx + c = 0, a cannot equal 0 are given by the following formula -b + or - square root of (b^2 - 4ac) / 2a. If b^2 - 4ac = 0 then equation has a single root. if b^2 - 4ac > 0 then equation has two real roots. if b^2 - 4ac < 0 then equation has two complex...
2
8142
by: beambohus | last post by:
please how do i solve this........ To write an algorithm to solve quadratic equation using almighty formular. please your respond will very much appreciated
1
1973
by: shiska | last post by:
hello ,there could u please help me to display a c program on a quadratic equation ax2+bx+c. thanx
3
1981
by: newbprogrammer | last post by:
I just started programming in c++ and i tried to explore and do programs on my own... So i wanted to do a program that would help me in my daily school work ... a program to solve quadratic equations.. I wrote the code correctly but errors are still detected and i have no idea why.. almost gave up and banged my head on the wall .. so i would really appreciate help.. This is the code so far.. #include <cmath> #include <iostream> using...
1
2998
by: candacefaye1 | last post by:
1. write a C++ program to decide if the coefficients of a quadratic equation have real roots. The three choices will be to write the message “zero divide” when A is zero, write the message “no real roots” if the discriminant is negative and find the two roots when there is no error condition. DO NOT FIND THE ROOT IF THERE IS AN ERROR CONDITION. 2. use a NESTED DECISION to do the three parts of the algorithm above. 3. write a...
0
8483
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8824
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8673
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2818
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2060
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.