Upload
khairul
View
217
Download
0
Embed Size (px)
Citation preview
8/2/2019 projeekkkkk c+++ 2010
1/13
1
EEE 123/3[Computer programming]
Project Title:
SOLVING QUADRATICEQUATION
Group Number:26
Group Members Name:
1.Yazid Bin Yusof (108802)
2.Muhd Aliff Qhuzairee Bin Ramlee (109424)
8/2/2019 projeekkkkk c+++ 2010
2/13
2
Assalamualaikum..
First of all,we would like to express our appreciation for the
loving support we have received from our lectures,who have
helped us in our quest to complete this project, Dr Junita
Mohamad.Now,we realize how powerful c++ program can be as asoftware.It would be a hard and difficult task to complete this such
of project,but with the c++ software and guidance from our
lectures,this project has made a lot easier for us.
Also,we would like to take this opportunity to thank those who
have made this project a success especially to our lecturers,
collegues, friends and seniors at Universiti Sains
Malaysia,especially those from the school of Electrical andElectronic Engineering.
.
Thanks to all.
8/2/2019 projeekkkkk c+++ 2010
3/13
3
NO CONTENTS PAGE
1. Cover page 1
2. Acknowledgment 23. Table of content 34. Abstract 45. Introduction 56. Division of work 6
7. Methodology 78. Verification Procedure 99. Conclusion 1010. Reference 1111. C++ source code 12
12. Output program 13
8/2/2019 projeekkkkk c+++ 2010
4/13
8/2/2019 projeekkkkk c+++ 2010
5/13
5
This project is our first mini project in c++computer programming.After we have discussedabout what we want to do in this project,finally wehave decided to quadratic equation in our
programming.In this project,our objectives is we try to solve
the equation by using [b-(b-4ac)]/2a formula.Its means,when the user input the number for a,band c in the equation,program will run to display theroot according [b-(b-4ac)]/2a formula.If b-4ac=0, then the root is real root.Meanwhile if b-
4ac>0,the equation has real and distict root.For thecomplex root ,must cater b-4ac
8/2/2019 projeekkkkk c+++ 2010
6/13
6
Project timeline
WEEK DIVISION OF WORK
WEEK 8 Every person in our groupmust find as many information
as possible.WEEK 9 Combine all the informationtogether and choose the bestinformation to be used inprogramming
WEEK 10 Study how to do programming
correctly and excellently fromthe seniors or person whoexcel in C++ programming
WEEK 11 Start to do programmingWEEK 12 Continue to do programming
and check any error that has
been doneWEEK 13 Do double checking for errorand try to debug
WEEK 14 Presentation starts
8/2/2019 projeekkkkk c+++ 2010
7/13
7
PSEUDOCODE1.Start the program2.Declare the function prototype
3.Ask user to enter value for a,b and cthat contain in the quadratic equation.4.The program will detect the rooteither it is real root or complex root5.The program will call the function and
display the root by using given formula.6.End of the program.
8/2/2019 projeekkkkk c+++ 2010
8/13
8
FLOWCHART OF THE PROGRAM
START
NEGATIVE
POSITIVE
YES
NO
START
GET a,b and c
b-4ac
REAL ROOT
COMPLEX ROOT
X= (b-ROOT) / 2
CONTINUE
END
8/2/2019 projeekkkkk c+++ 2010
9/13
9
After compiling our programs,we have
tried key in a number in the equation and
the program display the correct answer.We
have also tried our program with various
equation and the roots obtain accurately.This
survey also proved that our program is
correct.
8/2/2019 projeekkkkk c+++ 2010
10/13
10
Our project was a success though we have met
many unexpected roadblocks along the way. We
have checked our program multiple times and
tested its effectiveness with users around the
campus as well as other programmers. Throughthis survey, we have realized that our program is
user friendly and easy to understand. Our
program is also unique and effective due to
some tough equation that we have chosen to test
the accuracy of our program.
8/2/2019 projeekkkkk c+++ 2010
11/13
11
*Notes from Dr Junita Mohamad Saleh
*http://en.wikipedia.org/wiki/Getch
*http://support.sas.com/documentation/onlinedoc/sas
c/doc/cplus/z0274855.htm*http://www.cplusplus.com/refrence/
8/2/2019 projeekkkkk c+++ 2010
12/13
12
C++ Source Code#include #include
#include
using namespace std;int Root();
int main()
{Root();
getch();
return 0;
}
int Root()
//int main()
{
float a, b, c, x1, x2, root;
cout
8/2/2019 projeekkkkk c+++ 2010
13/13
13
}
}