Professional Documents
Culture Documents
Name
Name
Name
Computer Science
Project
Class:- XII Roll no.
27
Index
Serial Name of the topic Page
no. no.
1. Application Of C programming 1
a. Introduction 1
g. Output webpages 12
3. References 18
4. Conclusion 18
5. Acknowledgement 18
Application Of C Programming
Method Of Bisection
Introduction:-
The advent of high speed digital computers and it’s increasing use in
finding numerical solutions to problems of various branches of science and
engineering has led to increased demand of courses on numerical analysis.
Numerical analysis is concerned with methods which give numerical
solutions to mathematical problems by arithmetic operations of numbers.
The Bisection method is devoted to compute numerically the
roots of an equation of the form f(x)=x-4x-9. The method discussed here are
based on iterative techniques.
Step 1: Choose two values, a and b such that f(a) > 0 and f(b) < 0 .
Step 4: The root of the function is found only if the value of f(c) = 0.
(2)
To get the right value with the new value of a or b, we go back to step 2 And
recalculate c.
Algorithm:
1. Start
2. Read x1, x2, e
*Here x1 and x2 are initial guesses
e is the absolute error i.e. the desired degree of accuracy*
3. Compute: f1 = f(x1) and f2 = f(x2)
4. If (f1*f2) > 0, then display initial guesses are wrong and goto
(11).
Otherwise, continue.
5. x = (x1 + x2)/2
6. If ( [ (x1 – x2)/x ] < e ), then display x and go to (11).
* Here [ ] refers to the modulus sign. *
7. Else, f = f(x)
8. If ((f*f1) > 0), then x1 = x and f1 = f.
9. Else, x2 = x and f2 = f.
10.Goto (5).
*Now the loop continues with new values.*
11.Stop
(3)
Flowchart: -
(4)
Language Selection: - There are so many languages like
FORTRAN, C, C++ etc. are used to solve the numeric
problems. I have selected C programming language to solve
this problem according to our HS syllabus.
Source Code: -
#include<stdio.h>
#include<math.h>
float fun (float x)
{
return (x*x*x - 4*x - 9);
}
void bisection (float *x, float a, float b, int *itr)
{
*x=(a+b)/2;
++(*itr);
printf("Iteration no. %3d X = %7.5f\n", *itr, *x);
}
int main()
{
int itr = 0, maxmitr;
float x, a, b, allerr, x1;
printf("\nEnter the values of a, b, allowed error and
maximum iterations:\n");
scanf("%f %f %f %d", &a, &b, &allerr, &maxmitr);
bisection (&x, a, b, &itr);
do
{
if (fun(a)*fun(x) < 0)
b=x;
else
a=x;
bisection (&x1, a, b, &itr);
if (fabs(x1-x) < allerr)
{
printf("After %d iterations, root = %6.4f\n", itr, x1);
return 0;
}
x=x1;
(5)
(6)
Webpage Designing Using HTML
Festivals Of India
(A) Design the Homepage:
<HTML>
<HEAD>
<TITLE>Festivals Of India</TITLE>
</HEAD>
<BODY BGCOLOR="#ffff99">
<B><I><FONT SIZE="+5"><P STYLE="COLOR:#e65c00">Festivals Of
India</FONT></P>
<P><FONT SIZE="+2">Festivals in India are celebrated in many parts of
India, as India is subdivided into different Linguistic States. The local
Government in each State also specifies certain festivals, in addition to
Central Government festivals and holidays, depending on the local population
which have elected them .</P>
<P>India is a multi-cultural country, and it is reflected in the Festivals of
India: Festivals of India is about various social, religious, and national
festivals celebrated in different parts of India. India has been rightly
described as a sub-continent and of its major festivals, many are region-
specific festivals too. There are many festivals which are celebrated as
national festivals; while a number of them are celebrated by members of
particular religious or social groups. India is a land of festivals. These Indian
festivals bind all Indians together of different castes, religions, etc there is no
discrimination while celebration. When there is no discrimination then it is
called INDIA .</P>
The major festivals are listed under:
<OL>
<LI><A HREF="Diwali.html">Diwali</A>
<LI><A HREF="Durga Puja.html">Durga Puja</A>
<LI><A HREF="Eid-Ul-Fitr.html">Eid-Ul-Fitr</A>
(7)
<LI><A HREF=”Christmas.html”>Christmas</A>
<LI><A HREF=”Holi.html”>Holi</A>
</OL></B></I></FONT>
</BODY>
</HTML>
(B) Design the Diwali (hyperlinked) page:
<HTML>
<HEAD>
<TITLE>Diwali</TITLE>
</HEAD>
<BODY BGCOLOR=”#ffcc00”>
<B><I><FONT SIZE=”+10”><P STYLE=”COLOR:#0055ff”>Diwali-
Festival of Lights
</P></FONT></B></I>
<B><I><FONT SIZE=”+2”><P>This pan Indian festival, famous for
lighting up our lives, Diwali is joyously celebrated globally now. Sending a
powerful message of the triumph of good over evil, the festival is celebrated in
every nook and corner of the country. People enjoy the festival of lights by
beginning the day with an auspicious pooja, followed by welcoming the night
with new traditional clothes, sweets and glowing deeyas. The houses are
decorated with garlands of electric lights and colourful rangolis. Ignite the
light of brotherhood and goodness in you being through the festival of
Diwali.</P></B></I>
<CENTER>
<IMG SRC=”C:\Users\amiad\Downloads\Notes\diwali.jpg” Height=”400”>
<A HREF=”Festivals of India.html”>To the main page</A></FONT>
</CENTER>
</BODY>
</HTML>
(8)
(C) Design the Durga Puja (hyperlinked) page:
<HTML>
<HEAD>
<TITLE>Durga Puja</TITLE>
</HEAD>
<BODY BGCOLOR="#ff8000">
<B><I><FONT SIZE="+10"><P STYLE="COLOR:#ffff00">Durga Puja-
Durgotsava or Navaratri</FONT></P>
<P><FONT SIZE="+2">A festival celebrating the powerful Goddess Durga,
Durga Puja is a major festival for the Bengalis in India. The colourful and
high energy festival is celebrated by decorating huge pandals, in the middle of
which a heavily decorated idol of Goddess Durga sits. The festival is marked
by a lot of dancing, singing and wholesome enjoyment. Celebrations of Durga
Puja in Kolkata is a can’t-miss sight, it is really a lifetime opportunity to
witness a festival in the heart of its existence.</P></B></I>
<CENTER>
<IMG SRC="C:\Users\amiad\Downloads\Notes\durga-pooja.jpg"
Height="400">
<A HREF="Festivals of India.html">To the main page</A></FONT>
</CENTER>
</BODY>
<HTML>
(D) Design Eid-Ul-Fitr (hyperlinked) page:
<HTML>
<HEAD>
<TITLE>Eid-Ul-Fitr</TITLE>
</HEAD>
<BODY BGCOLOR="#80ff80">
(9)
<B><I><FONT SIZE="+10"><P STYLE="COLOR:#006600">Eid-Ul-Fitr-
Marks the End of Ramadan</FONT>
<P><FONT SIZE="+2">Eid-Ul-Fitr is a major festival for Muslims in
India. The festival is marked by people visiting the mosque for an auspicious
prayer, wearing new clothes and preparing delicacies like sewainyan to be
savoured. Children are given idi, a small token of money as a gift and
relatives exchange sweets and gifts with each other. It is a festival that
celebrates brotherhood among humanity.</P></B></I>
<CENTER>
<IMG SRC="C:\Users\amiad\Downloads\Notes\eid-ul-fitr.jpg"
Height="400">
<A HREF="Festivals of India.html">To the main page</A></FONT>
</CENTER>
</BODY>
</HTML>
(E) Design the Christmas (hyperlinked) page:
<HTML>
<HEAD>
<TITLE>Christmas</TITLE>
</HEAD>
<BODY BGCOLOR="#e085c2">
<B><I><FONT SIZE="+10"><P STYLE="COLOR:#b30059">Christmas-
Birth of Jesus Christ</FONT>
<P><FONT SIZE="+2">The birth of Jesus Christ is celebrated with ecstatic
merriment and wonderful joy, throughout India. The warm smell of walnut
cakes can be inhaled in every household. As if captivated by a confetti of
Santa caps, Christmas sees the prevalence of these caps and reindeer
headgear decorating the heads of civilians. Many people decorate Christmas
trees in their homes with colourful stars and hanging balls. People also visit
the Church to seek the holy blessings of Christ on this auspicious
festival.</P>
<CENTER>
(10)
<IMG SRC="C:\Users\amiad\Downloads\Notes\christmas.jpg"
Height="400">
<A HREF="Festivals of India.html">To the main page</A></FONT>
</CENTER>
</BODY>
</HTML>
(F) Design the Holi (hyperlinked) page:
<HTML>
<HEAD>
<TITLE>Holi</TITLE>
</HEAD>
<BODY BGCOLOR="#80ffff">
<B><I><FONT SIZE="+10"><P STYLE="COLOR:#008000">Holi-
Festival of Colors</FONT>
<P><FONT SIZE="+2">The Pandora box of wholesome fun and good
natured pranks characterise the atmosphere in the colourful festival of Holi.
This festival is also slowly gaining popularity in the global sphere. Holi is
celebrated by throwing and applying colours on each other, in myriad hues of
jubilance. The festival is even played by throwing and splashing water on
each other, via a friendly weaponry of water guns and water balloons.
Immerse yourself in the pinks, greens and reds of Holi, and forget all your
blues for this day.</B></I></P>
<CENTER>
<IMG SRC="C:\Users\amiad\Downloads\Notes\holi.jpg" Height="400">
<A HREF="Festivals of India.html">To the main page</A></FONT>
</CENTER>
</BODY>
</HTML>
(11)
References: -
Introductory Numerical Analysis – Dutta and Jana
Programming in C – Byron Gottfried
Numerical Analysis (2nd Edition) – Schield F
ANSI C – E. Balaguruswamy
Rudiments Of Computer Science – J. Bhattacharya
Conclusion: -
The project has been completed with the co-operation of the classmates
and the guidance of the teacher concerned and using C language. In the
course of the implementation of the project, various knowledge has been
acquired on various matters of importance. The experience and the
knowledge acquired while using C language will certainly be of much help in
implementing much larger projects in future.
Acknowledgement: -
It is a matter of great privilege for me to record my deep sense of
gratitude and thankfulness to M. Fadikar, Department of Computer Science,
Behala Aryya Vidyamandir, under the WBCHSE, to whom I am greatly
indebted for his ingenious guidance, valuable suggestions in various aspects
without which it would not have been possible for me to present this report. I
also wish to thank my friends for their cheerful smiles and moral support
which opened the gate of encouragement and made my work so much easier.