0% found this document useful (0 votes)
682 views

SCIENTIFIC Calculator Report File

The document describes a project report submitted by Anand Kumar Pandey for the development of a scientific calculator. It includes an introduction to scientific calculators and their functions. The objective of the project is to develop a scientific calculator that can perform basic mathematical operations as well as exponential, logarithmic, trigonometric and other advanced functions. The report also includes sections on hardware and software requirements, the algorithm, literature review, technology used, output screenshots, conclusions, and future scope.

Uploaded by

Anand Pandey 123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
682 views

SCIENTIFIC Calculator Report File

The document describes a project report submitted by Anand Kumar Pandey for the development of a scientific calculator. It includes an introduction to scientific calculators and their functions. The objective of the project is to develop a scientific calculator that can perform basic mathematical operations as well as exponential, logarithmic, trigonometric and other advanced functions. The report also includes sections on hardware and software requirements, the algorithm, literature review, technology used, output screenshots, conclusions, and future scope.

Uploaded by

Anand Pandey 123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

SCIENTIFIC 

CALCULATOR

PROJECT REPORT

Submitted in partial fulfillment of requirement the for the award of the degree of

BACHELOR OF TECHNICAL
Computer science and engineering

SUBMETTED BY

Anand Kumar Pandey (L.E)

Dr. APJ Abdul Kalam Technical University,


Uttar Pradesh,
Lucknow , India

1
CERTIFICATE

This is to certify that “Anand Kumar Pandey” student of B. tech (CSE) 2nd year section ‘A-1’
has successfully completed their project on “Scientific Calculator” under guidance of “Miss.
Farah Shan Khan”

2
AKNOWLEDGEMENT

I would like to express my special thank of gratitude to my teacher “Farah Shan Khan” for their
able guidance and support in completing my project.

I would also like to extend my gratitude to the HOD “Mr. Saurabh Singh” for providing me with
all the facility that was required.

DATE-: Anand Kumar Pandey


24/01/2023 B. tech (CS) 2nd year section “A-1”

3
INDEX Page No.

A. Introduction of the problem-----------------------------------------------------------5


B. Objective (Problem statement)- ------------------------------------------------------7
C. C. H/W, S/W Requirements--------------------------------------------------------------- 10
D. D. Flowchart /Algorithm/pseudo code--------------------------------------------------11
E. E. Literature Review-----------------------------------------------------------------------12
F. F. Technology Used-------------------------------------------------------------------------20
G. G. Output screen shot----------------------------------------------------------------------25
H. H. Conclusion--------------------------------------------------------------------------------29
I. I. Test analysis/Result analysis-----------------------------------------------------------30
J. J. Future scope -----------------------------------------------------------------------------32
K. K. Reference -------------------------------------------------------------------------------35
L. L. Appendix ---------------------------------------------------------------------------------36
i. Code of the solution---------------------------------------------------------------36
ii. ii. Final Programing code-----------------------------------------------------------

4
A. Introduction of the problem-:

A scientific calculator is an electronic calculator, either desktop or handheld, designed to


perform mathematical operations. They have completely replaced slide rules and are used in both
educational and professional settings.
In some areas of study scientific calculators have been replaced by graphing
calculators and financial calculators which have the capabilities of a scientific calculator along
with the capability to graph input data.

Functions
When scientific calculators were originally marketed they normally had only four of five
capabilities (addition, subtraction, multiplication, division and square root). Modern scientific
calculators generally have many more capabilities than the original four or five function
calculator, and the capabilities differ between manufacturers and models.
The capabilities of a modern scientific calculator include:

 scientific notation
 floating-point decimal arithmetic
 logarithmic functions, using both base 10 and base e
 trigonometric functions (some including hyperbolic trigonometry)
 exponential functions and roots beyond the square root
 quick access to constants such as pi and e
In addition, high-end scientific calculators generally include:

 cursor controls to edit equations and view previous calculations (some calculators
such as the LCD-8310, badge engineered under both Olympia and United Office keep
the number of the previous result on-screen for convenience while the new
calculation is being entered.[1])
 hexadecimal, binary, and octal calculations, including basic Boolean mathematics
 complex numbers
 fractions calculations
 statistics and probability calculations
 programmability — see Programmable calculator
 equation solving
 matrix calculations
 calculus
 letters that can be used for spelling words or including variables into an equation
 conversion of units
 physical constants.
 5
 While most scientific calculators have traditionally used a single-line display similar to
traditional pocket calculators, many of them have more digits (10 to 12), sometimes with
extra digits for the floating-point exponent. A few have multi-line displays, with some
models from Hewlett-Packard, Texas Instruments.

Uses

Scientific calculators are used widely in situations that require quick access to certain
mathematical functions, especially those that were once looked up in mathematical tables, such
as trigonometric functions or logarithms. They are also used for calculations of very large or very
small numbers, as in some aspects of astronomy, physics, and chemistry.
They are very often required for math classes from the junior high school level through college,
and are generally either permitted or required on many standardized tests covering math and
science subjects; as a result, many are sold into educational markets to cover this demand, and
some high-end models include features making it easier to translate a problem on a textbook
page into calculator input, e.g. by providing a method to enter an entire problem in as it is written
on the page using simple formatting tools.

History
The first scientific calculator that included all of the basic ideas above was the programmable
Hewlett-Packard HP-9100A,[2] released in 1968, though the Wang LOCI-2 and the Mathatronics
Mathatron   had some features later identified with scientific calculator designs. The HP-9100
series was built entirely from discrete transistor logic with no integrated circuits, and was one of
the first uses of the CORDIC algorithm for trigonometric computation in a personal computing
device, as well as the first calculator based on reverse Polish notation (RPN) entry. HP became
closely identified with RPN calculators from then on, and even today some of their high-end
calculators (particularly the long-lived HP-12C financial calculator and the HP-48 series of
graphing calculators) still offer RPN as their default input mode due to having garnered a very
large following.

The HP-35, introduced on February 1, 1972, was Hewlett-Packard's first pocket calculator and


the world's first handheld scientific calculator. Like some of HP's desktop calculators it used
RPN. Introduced at US$395, the HP-35 was available from 1972 to 1975.
6
Texas Instruments (TI), after the production of several units with scientific notation, introduced a
handheld scientific calculator on January 15, 1974, in the form of the SR-50. TI continues to be a
major player in the calculator market, with their long-running TI-30 series being one of the most
widely used scientific calculators in classrooms.

Casio, Canon, and Sharp have also been major players, with Casio's fx series (beginning with the
Casio fx-1 in 1972 being a very common brand, used particularly in schools. Casio is also a
major player in the graphing calculator market, and was the first company to produce one (Casio
fx-7000G).
7
B.Objective-:
A normal calculator only can do most basic functions: addition, subtraction,
multiplication and division, often also the square root.

A scientific calculator has additional functions:

 exponents (general, ex��, and general roots a−−√n=a1n��=�1�)


 logarithm (lnln and normally log10log10 inverse functions
to ex�� and 10x10�)
 trigonometric functions (sinsin, coscos,  tantan and their inverses) in both
degree and radian (often also gradian)
 storing results
 factorial (normally up to 6969 or 170170)
 handle fraction and mixed numbers
 some statistic tools

 Graphical Calculators can also display function plots on their display and programmable
calculators can run small user written scripts. You use them if you a little bit of higher
math.

 Calculators are simply a tool students use to help solve problems. Since they eliminate
tedious computations and algebraic manipulations that discourage many students,
calculators allow more students to solve problems and appreciate the power and
value of mathematics in the world today.

Basic requirement while using scientific calculator for math’s

There are two types of scientific calculators, one which is used for the simplification of
math’s problems and other which can be used to solve problems related to trigonometry,
geometry and algebra.

To use a scientific calculator for solving math’s problems, the basic requirements are as
follows:

1. The mathematical problem which has to be solved should be typed in the calculator using
correct syntax.
8

2. The direction of keys on the calculator should be kept as same as the direction on a
standard calculator.

3. The input key of the scientific calculator has to be pressed first, followed by the
mathematical operator key.

4. Wrong input should be checked thoroughly before getting started on a problem, since tis
can lead to wrong calculation.

5. Wrong input should be corrected immediately to avoid any incorrect result.

6. Different types of storage functions are available on a calculator such as memory and
register.

7. A scientific calculator can also be used to solve problems related to geometry, algebra and
trigonometry.

Scientific calculators can be used for general purpose to solve problems related to operations,
roots and fractions. This type of calculator is useful when a problem requires a number of
steps to be performed.

In mathematics, a scientific calculator can be used to solve problems related to square


roots and other roots, operations with fractions and polynomials, algebraic expressions
and other types of functions.

These calculators can be used to solve problems related to logarithms, trigonometric


equations and exponential functions.

 A scientific calculator is an electronic device that performs the basic operations of


arithmetic (addition, subtraction, multiplication and division). In maths, a scientific
calculator is a valuable and useful tool, since it allows the user to solve more difficult
equations greater than one or two terms quickly and easily.

Equations with a scientific calculator are commonly used in maths, physics and other
sciences. In fact, even some calculators created for mathematics can solve equations
containing roots or indeterminate.
9

In more advanced maths, a scientific calculator can be of great help in solving complex
problems, where the steps required to solve them manually would be too time–
consuming, tedious and inaccurate.

A scientific calculator is also used as a tool for checking solutions to more complicated
problems. In high school, a scientific calculator may be used in different ways:

 Either as a standalone tool, to solve problems on its own, without having to use paper and
pencil; or as part of a learning management system (LMS), to solve the more complicated
problems of mathematics; or finally, to learn how to use it.

A scientific calculator is important in maths for all of these reasons. It can do a lot more
than a normal calculator and definitely makes the process of learning math’s a lot easier.
In fact, in high school math, students are constantly required to make use of it in order to
solve problems. It is most commonly used in trigonometry, calculus and statistics:

Trigonometry Calculators

In trigonometry, a scientific calculator is used for solving problems involving sinusoidal motion
and trigonometric identities. There are several good online trigonometry calculators that students
can use to ‘calculate trigonometric angle functions (sin, cos, tan, sec, csc, tan) in either degrees
or radians’. All of these calculators are simple and easy to use. Examples of my favourite
trigonometry calculators include: Mathway, Microsoft Math Solver, symbolab, Giga calculator,
among others. Check out best trigonometry calculators list to learn more.

Calculus

In calculus, a scientific calculator is used to solve problems involving derivatives and integrals,
as well as other functions.
10

Statistics

In statistics, a scientific calculator is used to compute probabilities and statistical distributions.

Other subjects where a scientific calculator can be useful include physics, chemistry and algebra.

Some calculators have more advanced functions than others and can be used in higher math
classes and for engineering and other related fields. Be aware that not all calculators are good for
everyone, as some have a different view. Try before you buy to make sure it will work the way
you want it to.

Calculators designed for engineering and sciences usually have buttons that make the steps of
calculations easier; these calculators may also have advanced functions, such as conversion
between units.

Although a calculator may have many advanced functions, it is important to understand the basic
functions as well. In some cases, it may be easier to use a low-tech calculator for simple tasks,
such as adding and subtracting.

Study the guide books and manuals that come with your calculator to find out exactly what
functions it has and how to use them before you begin your calculations.
11

H/W, S/W Requirement-:


Software requirement

• Operating system : Windows 10


• Language : C Programming language
• Application Software : Dev C++, for execution of the program and
Power point, for presentation of output.

Hardware requirement

• Processor: Pentinum IV Processor


• RAM: 512 MB or more than 512 MB

• Hard disk: 80 GB or more than 80 GB


12

D. FLOWCHART-:
13
E) Literature Review-:

Methodology for research proposal youth unemployment strategic planning assignment higher
education, need for literature review meaning historical research paper about teenage pregnancy
art and critical thinking journals critical thinking purpose competency standards , color theory
assignments in design stress management research papers English grammar homework list non
verbal communication assignment and its importance critical thinking book healthcare critical
thinking images book literature review education leadership assignment marketing detailed
research proposal about social media marketing assignment of chemistry explosives cyber crime
research paper . introduction for an argumentative essay quiz essay on critical thinking larry
wright 2nd edition introduction to review of literature notes ?
research proposal on procurement management methodology of research proposal for students
critical thinking textbook Epstein review of literature zeroth tally erp 9 practical assignment
with gst portland state university creative writing book . cite for research paper book critical
thinking workbooks term paper on poverty , research paper about literature methods the literature
review ridley critical thinking purpose s writing a research paper on a person research paper on
advertising journal , strong critical thinking articles physical education assignments kho kho
cover for research paper . methodology of research paper nestle assignment on pollution taj
mahal research essay papers marketing term paper upp pgt sojourner truth essay biography my
research proposal on road traffic accidents .

Methods in research paper linguistics lia litosseliti research paper book quiz . research paper
advertising quiz editing research paper risk management in banking sector adrienne rich essays
biography noise pollution assignment journal help me writing a research paper in science
baglione assignment of chemistry beer argumentative essay conclusion about social media.

Dissertations books raven critical thinking for nurses 3rd edition church of critical thinking book
1 introduction to research proposal for specialists and trainees critical thinking foundation logic
puzzles timetable for research proposal hrm write an argumentative essay , ap statistics
homework book notre dame creative writing notes ou creative writing sentence starters thinking
and critical thinking for nurses 3rd edition encourage critical thinking vs problem solving
marketing dissertation qadhi assignment of judgement paris summary effective critical thinking
benefits , abstract in research
14
proposal flow chart , critical thinking in chemistry x cosmetology research paper using anova
movie research paper about teenage pregnancy creative copy writing unit plan literature review
on insurance work environment company research paper using secondary data ?

research papers on psychology virtual reality dissertation proposal creator critical thinking
meaning z introduction to logic and critical thinking merrilee salmon ?

advanced critical thinking books, essay on critical thinking puzzles research paper on hotel
management critical thinking a level journals critical thinking podcast fallacies bibliography for
research paper global warming , research paper instructions nanotechnology decision making
assignment case study introduction of assignment real numbers research papers sites about
depression , critical thinking conference notes critical thinking quote riddles literature review
paper book evaluating book pre calc homework review critical thinking foundation journal
articles critical thinking pictures Harvard submit research paper biology ?

critical thinking in philosophy law homework helpers earth science introduction literature
review notes , critical thinking characteristics books critical thinking appraisal lecture notes ,
comment faire une bonne introduction de dissertation mba thesis writers on project
management .
15
CHAPTER 2

REVIEW OF THE LITERATURE

The research interests for this project can be divided into five separate areas-

1. Disidentification and the mathematics classroom;


2. Technology in education;
3. Technology in mathematics education;
4. Technology to explore graphing concepts; and
5. Research on hand-held technologies and data collection devices in mathematics education

Disidentification and the Mathematics Classroom

Steele describes academic disidentification as the "process that occurs when people stop caring
about their performance in an area, or domain that formerly mattered a great deal." (Steele, 1992,
p.12). Hill (1997) applies this hypothesis to the mathematics classroom and argues that many
intrinsic qualities of a traditional mathematics classroom offer motives for student
disidentification from mathematics. Mathematics has been described as a gatekeeper subject that
has traditionally closed gates for students due to computational reliance and traditional methods
of tracking students into ability groups. The traditional mathematics classroom has caused some
mathematics students to disidentify with mathematics.

Tracking and filtering are the most overt examples of causes of students’ disidentification and
they intertwine with teacher expectations and differing views of mathematics between teacher
and student. Tracking in mathematics classes results in oversimplified, repetitive, and
fragmented instruction (Oakes, 1990). These classes require more rote memorization and less
critical thinking than high tracked classes where teachers pursue understanding of complex
themes. Oakes presented and described this as evidence that implementation and curriculum
differ across tracked classes
16
Many of the disidentification issues involving tracking and filtering are based on inequalities
evidenced by large numbers of African-American and Hispanic minorities and the poor in lower
tracked classes (Oakes, 1990). NCTM recommends opportunity for all indicating that those who
study advanced mathematics are most often white males. This is occurring, as careers are
becoming more focused on technical and technological literacy. Careers are rapidly evolving that
require more scientific and problem-solving skills. Advancement in mathematics can provide a
background and education in these skills for the workforce of the future. At the same time as the
increased focus on mathematics and technical skills, women and most minorities study less
mathematics and are seriously underrepresented in careers using science and technology.

Mathematics has become a critical filter for employment and full participation in our society
(NCTM, 1989). Walter Secada presents calculators as example technological tools that may aid
in removing the computational gate and filters to the study of mathematics. "Certainly by middle
school if not before, all students should have access to calculators, and the focus of the
curriculum should be enlarged beyond number and computation." (Secada, 1990, p.139) The
influence of technology as an instructional practice has been identified and described as a
component of an organized program as a tool to increase students' conceptual understanding of
mathematics and facilitate more students taking additional and advanced mathematics courses.
"Teachers in OFA (Organized for Advancement) used Calculators and Computers as tools to
allow concentration on concepts and strategies instead of getting mired in arithmetic, and
students also learned more problem-solving." (Gutiérrez, 1996, p.519)
Many students face self-esteem issues and on occasion demonstrate negative attitudes toward
mathematics and schooling especially those who are tracked in lower mathematics classes.
Technology offers opportunities to create instructional and educational environments that
promote the mathematical learning of all students. NCTM, in fact, describes the deprivation of
technological tools in the mathematics classroom as inequitable and handicapping to the students
in our society. (1998)

17
Reviewing Steele's disidentification hypothesis and additional studies focused on technology in
mathematics education it may be possible to develop methods that may help both high and low
performing students improve their self-esteem in their mathematics classes and help them
identify more with mathematics with technology. Research on graphing calculators in the
mathematics classroom (Hembree & Dessart, 1986) has shown there is an increase in positive
attitudes toward mathematics and an increase in self-concept in mathematics with students using
calculators. Dunham (1995) also found that female students' confidence levels and algebra skills
increased in the mathematics classroom with the introduction of the graphing calculator.

Technology in Education

Technology has frequently been viewed as a widely useful asset to education. It is only in recent
years that concerted efforts have been undertaken to mandate the inclusion of technology in
educational settings. Prior to recent reform movements to incorporate technology and recent
technological advances Seymour Papert in Mindstorms (1980) presented insights into the future
of education with the advent of the personal computer. Papert describes two major research
themes from the early 1980s that are relevant to research in technology and education even
today. "Children can learn to use computers in a masterful way, and that learning to use
computers can change the way they learn everything else." (Papert, 1980, p.83)

Papert then explains a very important aspect of learning through technological means. Learning
through technology is more than just fun, very powerful kinds of learning are taking place.
Children are learning to speak mathematics and acquiring a new image of themselves as
mathematicians (Papert, 1980).

Interest in the use of technology to improve K-12 Education for US students has increased in
recent years. This interest has promoted the creation of committees and interest groups to
promote the implementation of technology in the K-12 setting. The Panel on Educational
Technology was formed in April 1995 under the President’s Committee of Advisors on Science
and Technology (PCAST) to inform and advise the President on the application of technology in
the K-12 setting. PCAST summarized six recommendations on the use of technology in K-12
education. These are:

18
(1) Focus on learning with technology, not about technology. It is important
to distinguish between technology as a subject area and the use of
technology to facilitate learning about any subject area. The importance of
technical knowledge in the coming century is very evident however,
PCAST recommends that technology be integrated across the K-12
curriculum and not solely for purposes related to learning technical or
technology-related skills.

(2) Emphasize content and pedagogy, not just hardware. Current educational reform
efforts emphasize the development of higher-order reasoning and problem solving skills.
These same emphases are evident in NCTM standards documents that emphasize the
"process standards of problem solving, and reasoning." (1989). The role of technology in
achieving the goals of these reform efforts should be emphasized. PCAST recognizes the
importance of appropriate hardware and software in educational settings but attention
should be given to the potential role of technology in achieving the goals of current
educational reform efforts through the use of new pedagogic methods. PCAST draws
attention to reform movements that extol the benefits of constructivist learning in
education, whereby students actively construct the knowledge of a particular concept and
negotiate goals and meanings with others in the class, including the instructor.

(3) Give special attention to professional development. K-12 teachers should be provided
with preparation and support to implement technology in their classrooms. Teachers should
be provided with ongoing mentoring and should have time and support to familiarize
themselves with software and content to incorporate technology into their lesson plans.

(4) Engage in realistic budgeting. PCAST encourages schools to incorporate technology


expenditures into their operating budgets rather than relying on one-time grant awards or
other capital campaigns.

19
(5) Ensure equitable, universal access regardless of socioeconomic status, race, ethnicity,
gender, or geographic factors, and special attention should be given to students with special
needs. Access to knowledge-building and communication tools should be made available
to all  students. "Educational technologies have the potential to ameliorate or exacerbate the
growing gulf between advantaged and disadvantaged Americans, depending on policy decisions
involving the ways in which such technologies are deployed and utilized." (PCAST, 1997)

 (6) Initiate a major program of experimental research to ensure the efficacy of technology
use within our nation’s schools. A program of research on education in general and
educational technology will prove necessary to ensure the effectiveness of technology
use. PCAST recommends that this research take place concurrently with the infusion of
technology in K-12 education.

Technology in Mathematics Education

NCTM recommends that technology receive increased emphasis in the K-12 mathematics
curriculum especially in relation to teachers' professional development, equitable and universal
access, and emphasizing content and pedagogy. NCTM Emphases include-

 appropriate calculators should be available to all students at all times;


 a computer should be available in every classroom for demonstration purposes;
 every student should have access to a computer for individual and group work;
 Students should learn to use the computer as a tool for processing information and
performing calculations to investigate and solve problems. (NCTM, 1989)

The focus on technology in mathematics education has received increased attention in recent
years and drawn serious criticism. Critics of technology in the mathematics classroom describe
the use of calculators as a crutch or replacement for understanding and learning the basics
(Pomerantz, 1997). Proponents of technology generally contend that technology should not
replace the learning of the basic concepts but supplement the curriculum to encourage deeper and
more substantial explorations into the mathematics concepts. Pea (1985) suggests using
technology to help students cognitively reorganize mathematical knowledge.

20
 Computers are commonly believed to change how effectively we perform traditional
tasks, amplifying or extending our capabilities with the assumption that these tasks stay
fundamentally the same. A primary role of computers is changing the tasks we do not by
merely amplifying but by reorganizing our mental functioning. (Pea, 1985, p. 5)

This is a crucial point that Pea makes in drawing the line between technology that simply makes
tasks quicker or easier in mathematics education. Which often comes under fire from those who
would oppose technology in mathematics education. Rather Pea supports a complete
restructuring in the nature of the activities explored and the nature of the tasks performed.

Kaput (1992) has analyzed the position and importance of technology in mathematics education
while posing the question: "What are the new things that you can do with technology that you
could not do before or were not practical to do?" This notion reflects Pea’s writing on the
potential for technology to reorganize mathematical and scientific thinking and not solely
amplify what is currently pursued. Kaput explains research on graphing systems to make
accessible to students as young as the middle school level some of the core ideas of calculus like
rate of change and explains that this can be done without the introduction of algebra (1992). This
opens such questions as: what curricular ideas are appropriate for what grade level and even
what curricular ideas are appropriate for certain ability tracked classrooms? When and how
should graphing concepts and complex concepts such as rate be introduced to mathematics
students?

Technology to Explore Graphing Concepts

As Frances Van Dyke (1994) explains, graphs should be emphasized when algebra is first
introduced. Picturing the correct graph when given a situation or statement is a good
intermediate exercise and promotes abstract thinking for the students. She explains that with the
arrival and increased use of graphing calculators, students should become comfortable working
with graphs. Van Dyke points out that often in real-world contexts, and examples, there are very
few occurrences that can be explained or presented in clean algebraic notation, whereas a graph
of this data can be drawn with the aid of a calculator and can then be analyzed.

21
Mevarech and Kramarsky (1997) report that graphing involves interpretation - the ability to read
a graph and gain meaning from it - and construction - building a graph from data or points.
Students do not read graphs without prior knowledge and they generally come into situations
where reading graphs is necessary with a number of conceptions and misconceptions. Several
misconceptions surrounding graphs and graph interpretation are common-

 considering the graph as a picture of an event or events (graph as a map);


 confusing an interval and a point; and
 Conceiving a graph as constructed of discrete points.

 (Mevarech, 1997)

Fernandez (1998) also presents common student conceptions and misconceptions about graphs.
She found that students often confuse the graph with the actual event and mistakenly use the
visual configuration of the graph to describe the actual event. This is very much related to
students who consider a graph as a map or picture of an event. She eventually designed a
research study where she examined student approaches to graphs and features of graphs created
in real-time using motion-detectors.

Dunham's review of calculator research (1993) presented reports and studies that show students
who use graphing calculator technology-

 place at higher levels in a hierarchy of graphical understanding;


 are better able to relate graphs to their equations;
 can better read and interpret graphical information;
 obtain more information from graphs;
 have greater overall achievement on graphing items;
 are better at "symbolizing," that is, finding an algebraic representation for a graph
 better understand global features of functions;
 increase their "example base" for functions by examining a greater variety of
representations, and;
 better understand connections among graphical, numerical, and algebraic
representations;
 had more flexible approaches to problem solving;

22
 were more willing to engage in problem-solving and stayed with a problem
longer;
 concentrated on the mathematics problems and not on the algebraic manipulation;
 solved non-routine problem inaccessible by algebraic techniques; and
 believed calculators improved their ability to solve problems.

 (Dunham, 1993, p.442-443)

This broad band of research conclusions gathered by Dunham points to the potential of graphing
technology to affect the way students learn graphing concepts and problem-solving strategies.

Dunham expanded the research to explore the possibility for graphing technology to affect the
types of learning students experienced and the attitudes students exhibited when using graphing
calculator technology. After this review, Dunham found studies that concluded those students
who use graphing calculator technology-

 were more active , they participated in more group work, investigations, and problem
solving explorations (Dunham, 1993; Dunham & Dick, 1994);

 are better able to read and interpret graphs, understand global features, and relate graphs
(Dunham, 1996); and

 female students improve in confidence, spatial ability, and algebra skills (Dunham 1995)

23
 Hand-Held Technology and Data Collection Devices

Recommendations for graphing calculators in mathematics education and research supporting


these recommendations have explored the potential of graphing calculators to enhance the
students' experience with multiple representations of mathematical ideas, recommended by
NCTM, (1989)

The NCTM Standards 2000 Draft states that the collection of real-time data through computer or
calculator-based laboratories and data-collection devices provides ways for the students to
analyze the data in meaningful and relevant ways. NCTM recommends these tools for the middle
school classroom for the exploration of topics such as rate and rate of change that were
previously reserved for calculus courses through empirical trial methods. While promoting the
increased use of technology NCTM warns against the reliance upon such technology in lieu of
development of knowledge of facts and procedures.

Pea's distinction between amplification and reorganization (1985) is relevant in terms of


calculator technology. Calculators as supported by NCTM, and used effectively to explore
graphs, should not take the place of learning to plot points on axes but rather open doors for
exploring these points and graphs in terms of real-world conditions and scenarios. The tasks and
approaches should be reorganized to support new and different ways of performing procedures
instead of amplifying the tasks that had previously been performed.

Fernandez (1998) emphasized data collection devices used with graphing calculators in her study
of students understanding graphs with technology. She describes data collection devices as
having the potential to focus mathematics instruction on the features of the graphs rather than
point by point analyses. Data collection devices such as the Texas Instruments CBR and CBL
units seem to be especially valuable for enhancing students’ ability to interpret graphs and create
graphical representations to describe actual events.

24
In her study, Fernandez (1998) worked with a high school mathematics teacher to observe the
teacher instruct a weeklong unit to geometry and algebra students using calculators and data
collection devices. Using motion detector devices attached to graphing calculators, the students
manipulated graphs by exploring changes in their motion and subsequent changes in the graphs
they were creating. The students became "investigators, and problem solvers/posers" (1998) in
this study while discussing patterns and generalizations of the graphs they created. The results of
the Fernandez study and research show that student understanding of graphical features and
concepts such as rate of change had improved with the implementation of the graphing tools. Her
study also suggests that data collection devices and units arranged around this equipment have
implications for improving the attitude that students exhibit toward mathematics.

 This technology provides students with tools to experiment in creating


different graphical representations that involve motion and time, two important
variables in the analysis of real data. Through this experimentation in a social
context, the students expanded their roles in classroom interactions. Additionally,
this study suggests the potential of this technology in promoting positive attitudes
toward learning about mathematics. (Fernandez, 1998, p.78)
Summary

The research on technology in education presents evidence that the infusion of technology can
prepare students for the entrance into an increasing technological workforce. Research on
graphing calculators presents opportunities to involve more students learning through technology
and for students to identify with mathematics. The disidentification hypothesis was of interest to
this research as Steele (1992) outlines ways in which students might actively choose to not
participate in mathematics after they are subjected to stimuli that devalue their achievement
within a particular area.

Fernandez and Dunham's research imply that graphing calculators have the potential to help
students identify with mathematics. Dunham's research on graphing calculator use among female
students who improved in areas of confidence and spatial ability is relevant in this case. How can
technology help students gain more positive attitudes toward mathematics, especially those low
performing students who may exhibit negative attitudes toward mathematics and tracked into
lower ability groups? How can hand-held calculators help middle school students learn
mathematics?

25
F) Technology Used-:

Depends on what type of scientific calculator you buying. Most have the Following features

1. Basic addition, subtraction multiplication and division


2. Logarithms and exponents- the keys are log, ln, y ^x
3. Square root and square of numbers.
4. Reciprocal key labeled 1/x or x^-1
5. Trigonometry functions sine cosine and tangent along with there inverse
functions
6. Multiple memories
7. Statistical functions for doing Probability and Statistical analysis
8. Some built in constants like Pi, e. c - speed of light in a vacuum. Gravitational
constant … etc
9. Scientific notation and rounding numbers to 0- 9 or Floating point
10. Degrees, Radian or Grad format for trigonometry functions
11. Fraction calculator where you add, subtract, multiply and divide two fractions
and get the results in fractions
12. A degree minute and second conversation to decimal fraction format and vis
vera
13. Some advanced one can do decimal number to any base conversion the
following
A. Hexadecimal base 16

B. octal base 8

C. binary base 2

D. Decimal base 10

14. computer gate or Boolean operators

And, Or, Not, Exor, Nand, Nor.

15. Parentheses and brackets for orders of operations

That all I can think of.

But the calculator package and instructions list what features it has and how to use
them

26
Here are the top five uses for a scientific calculator and how you may be expected to use it
in your next class.
 Basic functions and exponents. Calculate basic functions such as addition, subtraction,
multiplication, and division. ...
 Logarithms. ...
 Sine, cosine, and tangent functions. ...
 Scientific notation. ...
 Binary functions.
The following table is a list of common mathematical functions and what they define:
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX
➢ Mode-CMPLX

-CMPLX
➢ Mode

➢ Mode-CMPLX
Table 8-1 Calculator Function Keyboard Equivalents
Function  Keyboard Description 
  Equivalent 

Number Int  Control-i  Integer portion of current entry 


Manipulation
Operators 

  Frac  Control-f  Fractional portion of entry 

  Abs  Control-u  Absolute value of current entry 

  +/-  C  Change arithmetic sign 

  1/x  r  1 divided by current entry 


Function  Keyboard Description 
  Equivalent 

  x^2  @  Square of current entry 

  %  %  Percentage using current entry and next


entry 

  Sqrt  s  Square root 

  Asc  Control-a Displays ASCII value of character typed


char  after Control-a 

Menu Base  B [b,o,d,h]  Change the base to binary [b], octal [o],
Opzerators  decimal [d], or hexadecimal [h] 

  Disp  D [e,f,s]  Change display mode to engineering [e],


fixed point [f], or scientific [s] 

  Mode  M [b,f,l,s]  Change calculator mode to default basic


mode [b], or to financial [f], logical [l], or
scientific [s] mode 

  Acc  A[0-9]  Set display accuracy to 0 through 9


significant digits 

  Con  # [0-9] Display a constant value. The constants are


(defaults)  labeled from 0 through 9 and can be
defined by entries in the .calctoolrc file.
Default values are:

0 - 0.621 (kms per hour / mph) 

1 - 1.41421 (square root of 2)  

2 - 2.71828 (e)  

3 - 3.14159 (pi)  
Function  Keyboard Description 
  Equivalent 

4 - 2.54 (cms / inch)  

5 - 57.2958 (degrees in radian)

6 - 1048576.0 (2 to power of 20)  

7 - 0.0353 (gms / oz)  

8 - 0.948 (kilojoules /thermals)  

9 - 0.0610 (cubic cms /cubic in) 

  Fun  F[0-9]  Execute a function. There are 10 functions,


labeled 0 through 9, taken from .calctoolrc. 

  Rcl  R[0-9]  Retrieve value in memory register. There


are 10 memory registers, labeled 0 through

  Sto  S[0-9]  Store value in memory register 0 through 9 

  Exch  X[0-9]  Exchange current entry with contents of


memory register 0 through 9 

Other Clr  Delete  Clear calculator display 


Operations 

  Bsp  Back Space  Delete rightmost character and recalculate 

  (and)  (and)  Set arithmetic precedence 

  Exp  E  Turn current entry into scientific notation


mantissa. Next entry becomes exponent. 

  Keys  k  Toggle labels on calculator buttons


between mouse and keyboard equivalents 

  Mem  m  Display window showing 10 memory


register values 
Function  Keyboard Description 
  Equivalent 

  Quit  q or Q  Exit Calculator 

Financial Mode Ctrm  Control-t  Compounding term 


Operations 

  Ddb  Control-d  Double-declining depreciation 

  Fv  v  Future value 

  Pmt  P  Periodic payment 

  Pv  p  Present value 

  Rate  Control-r  Periodic interest rate 

  Sln  Control-s  Straight-line depreciation 

  Syd  Control-y  Sum-of-the-years`-digits depreciation 

Logical Mode Term  T  Payment period 


Operations 

  <  <  Shift current entry left 

  >  >  Shift current entry right 

  &16  [  Truncate to 16-bit unsigned integer 

  &32  ]  Truncate to 32 bit unsigned integer 

  Or  |  Logical OR of current and next entries 

  And  &  Logical AND of current and next entries 

  Not  ~  Logical NOT of current entry 

  Xor  ^  Logical XOR or current and next entries 

Scientific Mode Xnor  n  Logical XNOR of current and next entries 


Operations 
Function  Keyboard Description 
  Equivalent 

  Trig  T[d,g,r]  Set trigonometrical base to degrees [d],


gradians [g], or radians [r] 

  Hyp  h  Toggle hyperbolic function indicator 

  Inv  i  Toggle inverse function indicator 

  e^x  {  e raised to the power of current entry 

  10^x  }  10 raised to the power of current entry 

  y^x  y  Current entry raised to power of next entry 

  x!  !  Factorial of current entry 

  Cos  Control-c  Cosine of current entry 

  Sin  Control-s  Sine of current entry 

  Tan  Control-t  Tangent of current entry 

  Ln  N  Natural logarithm of current entry 

  Log  G  Base 10 logarithm of current entry 

  Rand  ?  Random number from 0.0 through 1.0 

Features of C Language

C is the widely used language. It provides many features that are given below.

1. Simple
2. Machine Independent or Portable
3. Mid-level programming language
4. structured programming language
5. Rich Library
6. Memory Management
7. Fast Speed
8. Pointers
9. Recursion
10. Extensible

31

1) Simple

C is a simple language in the sense that it provides a structured approach (to break the problem
into parts), the rich set of library functions, data types, etc.

2) Machine Independent or Portable

Unlike assembly language, c programs can be executed on different machines with some


machine specific changes. Therefore, C is a machine independent language.

3) Mid-level programming language

Although, C is intended to do low-level programming. It is used to develop system


applications such as kernel, driver, etc. It also supports the features of a high-level language.
That is why it is known as mid-level language.

4) Structured programming language


C is a structured programming language in the sense that we can break the program into parts
using functions. So, it is easy to understand and modify. Functions also provide code reusability.

5) Rich Library

C provides a lot of inbuilt functions that make the development fast.

32

6) Memory Management

It supports the feature of dynamic memory allocation. In C language, we can free the allocated
memory at any time by calling the free() function.

7) Speed

The compilation and execution time of C language is fast since there are lesser inbuilt functions
and hence the lesser overhead.

8) Pointer

C provides the feature of pointers. We can directly interact with the memory by using the
pointers. We can use pointers for memory, structures, functions, array, etc.
9) Recursion

In C, we can call the function within the function. It provides code reusability for every
function. Recursion enables us to use the approach of backtracking.

10) Extensible

C language is extensible because it can easily adopt new features.

33

34

G. Output screen shot:-

Output Screenshot-1

o Enter the Number


35

Output Screenshot-2

➢ Mode-CMPLX
Output screenshot-3

36
Output

screenshot-4
37

H) Conclusion-:

  In this work we have developed a calculator for exact real number computation and performed
a theoretical analysis of the algorithms and experimented on their implementation.
We began by defining two representations of reals in the range [-1,1] using streams of digits.
These were then extended to represent real numbers on the whole real line using a (mantissa,
exponent) style representation. We showed how to convert between these representations, how to
convert decimal numbers into a signed binary representation, and how to convert a finite portion
of the signed binary representation back into decimal.

Algorithms for the basic arithmetic operations were implemented for these representations. A
number of different techniques are used to obtain these algorithms, including exploiting the
relationship between the list operation `cons' and numerical average, using certain identities, and
analysing of the range of possible values of a stream starting with a given digit or sequence of
digits.

We developed an algorithm for the direct multiplication of two streams of signed binary digit.
This is a more complex operation than the multiplication of dyadic digit streams, but avoids the
problem of dyadic digit swell which can be observed if the dyadic digit multiplication is used to
compute iterations of the logistic map, for example, and which can cripple performance.

We also developed an algorithm for the division of two signed binary numbers. This is
significantly more complicated than the familiar school long division method because in the
school long division method we know the whole denominator, whereas when dividing by a
number with an infinite representation this is not the case. Other approaches such as Fourier's
cross-division method (a description of which can be found in 30 p.159-164) which examine the
denominator from right to left are also unsuitable because they allow digits which have already
been output to be `corrected' later on, and hence each output digit depends on an infinite number
of digits of the numerator and denominator.

We also developed an algorithm to compute the limits of Cauchy sequences. As far as we are
aware, no other such algorithm has been developed in the literature. This algorithm significantly
extends the range of computations which can be performed, and makes the calculator much more
flexible. This is because of the many useful functions can be expressed as the limits of Cauchy
sequences

38

1.Test Analysis:-

1. Check if the calculator is a normal calculator or a scientific calculator.

2. Verify that all the buttons are present and text written on them is readable.
3. Check the arithmetic operations are working fine- +, -, /, * etc.

4. Verify that BODMAS is applied in case of complex queries and the correct result
is returned.

5. Verify that the calculator gives the correct result in case of operations containing
decimal numbers.

6. Check if the calculator is battery operated or works on solar power.

7. Verify the outer body material of the calculator.

8. Verify the spacing between the two buttons, the buttons should not be too closely
placed.

9. Check the pressure required to press a button, the pressure required should not be
too high.

10. Verify the number of digits allowed to enter in the calculator for any operation.

11. Verify the limit of the response value.

12. Verify the functioning of memory functions.

13. Check if the calculator allows navigating through previous calculations.

14. Verify that hitting ‘C’ cancels any digits or operation added.

15. Verify the working of the ON-OFF button in the calculator.

16. Check if keeping the calculator unused for a certain period of time, turns it off
automatically.

17. Verify that on pressing two operators one after the other, the latest one will
override the previous operator.

18. Verify the state of the calculator when two buttons are pressed simultaneously.
19. Verify if the user can delete digits one by one using the backspace key

39

Digital or Physical Calculator Scenarios:

1. Validate all arithmetic operations (+, -, /, *, %, etc.) work properly.


2. Verify the sum or equals key works properly.
3. Verify all numbers work properly (0-9).
4. Validate the bracket keys work.
5. Verify the square and square root keys work.
6. Ensure BODMAS / BIDMAS is applied when running complex queries and
correct results are returned.
7. Validate using decimal characters yields the correct result.
8. Ensure spacing of all like buttons is equal.
9. Validate the number of digits allowed in the calculator for an operation.
10. Check the response value limit of the calculator.
11. Ensure the memory functions work as expected.
12. Validate previous calculations can be viewed.
13. Verify the “C” or clear button cancels all digits and operations entered.
14. Verify the back or delete button works when pressing the backspace key.
15. Validate the latest operation overrides the prior one when two operations
are pressed one after the other.
16. Verify the addition of two integer numbers.
17. Verify the addition of two negative numbers.
18. Verify the addition of one positive and one negative number.
19. Verify the subtraction of two integer numbers.
20. Verify the subtraction of two negative numbers.
21. Verify the subtraction of one negative and one positive number.
22. Verify the multiplication of two integer numbers.
23. Verify the multiplication of two negative numbers.
24. Verify the multiplication of one negative and one positive number.
25. Verify the division of two integer numbers.
26. Verify the division of two negative numbers.
27. Verify the division of one positive number and one integer number.
28. Verify the division of a number by zero results in an error.
29. Verify the division of a number by a negative number.
30. Functionality test cases: check the division of zero by any number results in
zero.

40
Case Diagram Of Scientific Calculator

An algebraic expression or math expression is a mathematical phrase that

can contain ordinary numbers, variables (like x or y) and operators (like

add, subtract, multiply, and divide).

In short, math expression is a group of characters or symbols

representing a quantity or an operation.

An Expression is a mathematical phrase that combines numbers and/or

variables using mathematical operations.

41
An expression is a representation of a value; for example, variables and/or

numerals that appear alone or in combination with operators are

expressions.

Example:

Calculate the math expression for the given expression

15*(4/3)/2

=15*(1.33)/2

=19.95/2

=9.975

Equivalent Expression Calculator is a free online tool that displays the equivalent expressions for
the given algebraic expression. BYJU’S online equivalent expression calculator tool makes the
calculations and simplification faster and it displays the equivalent expression in a fraction of
seconds.

How to Use the Equivalent Expression Calculator?


The procedure to use the equivalent expression calculator is as follows:
Step 1: Enter an algebraic expression in the input field
Step 2: Now click the button “Submit” to get the equivalent expression
Step 3: Finally, the equivalent expression for the given algebraic expression will be displayed in
a new window.

What is an Expression?
An expression is an expression which consists of variables, coefficients, constants, and
mathematical operators such as addition, subtraction, multiplication and division. Generally, if
two things are the same, then it is called equivalent. Similarly, in mathematics, the equivalent

expressions are the expressions that are the same, even though the expression looks different. But
if the values are plugged in the expression, both the expressions give the same result.

Example
Question:
Write the equivalent expression for the given expression: 3x+9
Solution:
Given expression: 3x+9
Take 3 outside from the expression, we get,
= 3(x+3), which is called the equivalent expression

40

J) FUTURE SCOPE-:

the extent of the area or subject matter that something deals with or to which it is relevant.

Accessibility:

the quality of being able to be reached or entered.


the quality of being easy to obtain or use.
the quality of being easily understood or appreciated.
the quality of being easily reached, entered, or used by people who have a disability.

Calculators have a wide scope of applications, being useful in many fields like science,
technology, accounting, marketing, education, finances, etc, etc. Their accessibility depends on
the user understanding basic mathematical concepts such as addition, subtraction, multiplication,
division, etc. Scientific calculators require a more advanced level of understanding from the user
for their scientific functions.

Calculators are ridiculously easy to obtain as they are available in hardware form in any supply
store or supermarket, and also in software form in computers, smartphones, tablets, etc. An
interesting form factor is the “calculator watch” which combines a calculator and a wrist watch
into a single device.

People with certain disabilities may have difficulties using a common calculator, but specialized
calculators for PWD are available in both hardware and software form.

There is an extremely huge list of all the factors that are a part of your rank in the Google Search
Engine. Google even has its own search quality evaluation guidelines that are frequently updated
and worth to check out. However, having this big list it’s really hard not to lose your tactics and
know what to look for to improve your ranking. So in between hundreds of all the factors, here
are the main ones I would exclude that need more attention:

44

Page quality

Google itself indicates the most important factors of the page quality. How to know if your
website can be highly rated?

The Purpose of the Page - Google cares about the growth of the internet and the benefits of the
websites in it. Common helpful and beneficial page purposes include sharing information that
could even be personal or social, sharing any forms of media, files and

software to download, sharing original opinion or point of view, entertaining, selling products or
services that are on demand, allowing discussions. Any helpful pages are most liked by Google
and those that have a potential of spreading hate, cause harm or misinform users can receive only
lowest rating.
E-A-T or Expertise, Authoritativeness, Trustworthiness - an important characteristic for all
beneficial pages. It includes the expertise of the content creator, the authoritativeness and the
trustworthiness of the content creator and the website itself. The standard for the expertise
depends on what the topic of the page is.

Main Content Quality and Amount - the quality of the content depends on the accuracy of the
topic, entertainment or the ease of use. Content also includes the features and functionality of the
website, so it is important to test them out. To create this type of content it should take a huge
amount of at least one of the following: time, effort, expertise, and talent or skill. The amount of
the content as well depends on the purpose of the page.

Website Information and information about who is responsible for the main content - high
quality pages should have clear and detailed information about the website, so the users of it
could feel comfortable trusting the page.

45

References:-

1. https://en.wikipedia.org/wiki/Scientific_calculator

2. https://www.eeweb.com/tools/online-scientific-calculator/

3. https://github.com/topics/scientific-calculator

4. https://data-flair.training/blogs/build-scientific-calculator-app-android-studio/
https://data-flair.training/blogs/build-scientific-calculator-app-android-studio/
5. https://www.studocu.com/in/document/lovely-professional-university/python/
pyproject-code/38646516

46

#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
#define new_calc 1
#define old_calc 0
class stand_calc
{
public:
static double
addition(double,double);
static double
substract(double,double);
static double
multiplication(double,doub
le);
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
#define new_calc 1
#define old_calc 0
class stand_calc
{
public:
static double
addition(double,double);
static double
substract(double,double);
static
double multiplication(double,double);
L) Appendix-:

Algorithm of Calculator Program

Step 1: Declare local variables n1, n2, res, opt. For example, where n1 and n2 take two numeric
values, res will store results and opt variable define the operator symbols.

Step 2: Print the Choice (Addition, Subtraction, multiplication, division, etc.

Step 3: Enter the Choice

Step 4: Takes two numbers, n1 and n2

Step 5: Switch case jump to an operator selected by the user

Step 6: Store result into res variable.

Step 7: Display the operation result

Step 8: Exit from the program

Different ways to create a Calculator Program in C

Following are the different ways to write a Calculator Program in the C language.

1. Calculator Program in C using the switch statement


2. Calculator Program in C using if else if statement
3. Calculator Program in C using do-while loop and switch statement
4. Calculator Program in C using function and switch statement

Example 1: Calculator Program in C using the switch statement

Let's write a program to create a Calculator program using switch statement

program.c

47
1. #include <stdio.h>  
2. int main()  
3. {  
4.     // declare local variables  
5.     char opt;  
6.     int n1, n2;   
7.     float res;  
8.     printf (" Choose an operator(+, -, *, /) to perform the operation in C Calculator \n ");  
9.     scanf ("%c", &opt); // take an operator  
10.     if (opt == '/' )  
11.     {  
12.         printf (" You have selected: Division");  
13.     }  
14.     else if (opt == '*')  
15.     {  
16.         printf (" You have selected: Multiplication");  
17.      }  
18.        
19.     else if (opt == '-')  
20.     {  
21.         printf (" You have selected: Subtraction");  
22.      }  
23.         else if (opt == '+')  
24.     {  
25.         printf (" You have selected: Addition");  
26.      }     
27.     printf (" \n Enter the first number: ");  
28.     scanf(" %d", &n1); // take fist number  
29.     printf (" Enter the second number: ");  
30.     scanf (" %d", &n2); // take second number  
31.  

48
32.     switch(opt)  
33.     {  
34.         case '+':  
35.             res = n1 + n2; // add two numbers  
36.             printf (" Addition of %d and %d is: %.2f", n1, n2, res);  
37.             break;  
38.           
39.         case '-':  
40.             res = n1 - n2; // subtract two numbers  
41.             printf (" Subtraction of %d and %d is: %.2f", n1, n2, res);  
42.             break;  
43.               
44.         case '*':  
45.             res = n1 * n2; // multiply two numbers  
46.             printf (" Multiplication of %d and %d is: %.2f", n1, n2, res);  
47.             break;            
48.           
49.         case '/':  
50.             if (n2 == 0)   // if n2 == 0, take another number  
51.             {  
52.                 printf (" \n Divisor cannot be zero. Please enter another value ");  
53.                 scanf ("%d", &n2);        
54.                 }  
55.             res = n1 / n2; // divide two numbers  
56.             printf (" Division of %d and %d is: %.2f", n1, n2, res);  
57.             break;  
58.         default:  /* use default to print default message if any condition is not satisfied */  
59.             printf (" Something is wrong!! Please check the options ");               
60.     }  
61.     return 0;  
62. }  

49
Output:

Example 2: Calculator Program in C using if else if statement

Let's consider an example to write a simple Calculator program in C using if else if statement.

program2.c

1. #include <stdio.h>  
2. int main()  
3. {  
4.     // declare local variables  
5.     char opt;  
6.     int n1, n2;   
7.     float res;  
8.     printf (" Select an operator (+, -, *, /) to perform an operation in C calculator \n ");  
9.     scanf ("%c", &opt); // take an operator  
10.     printf (" Enter the first number: ");  
11.     scanf(" %d", &n1); // take fist number  
12.     printf (" Enter the second number: ");  
13.     scanf (" %d", &n2); // take second number  
14.       
15.     if (opt == '+')  
50
16.     {  
17.
18.         res = n1 + n2; // add two numbers  
19.         printf (" Addition of %d and %d is: %f", n1, n2, res);  
20.     }  
21.       
22.     else if (opt == '-')  
23.     {  
24.         res = n1 - n2; // subtract two numbers  
25.         printf (" Subtraction of %d and %d is: %f", n1, n2, res);  
26.     }  
27.       
28.     else if (opt == '*')  
29.     {  
30.         res = n1 * n2; // multiply two numbers  
31.         printf (" Multiplication of %d and %d is: %f", n1, n2, res);  
32.     }  
33.       
34.     else if (opt == '/')  
35.     {  
36.         if (n2 == 0)   // if n2 == 0, take another number  
37.         {  
38.             printf (" \n Divisor cannot be zero. Please enter another value ");  
39.             scanf ("%d", &n2);        
40.         }  
41.         res = n1 / n2; // divide two numbers  
42.         printf (" Division of %d and %d is: %.2f", n1, n2, res);  
43.     }  
44.     else  
45.     {  
46.         printf(" \n You have entered wrong inputs ");  
47.     }

51
48.     return 0;  
49. }  

Output:

Example 3: Calculator Program in C using do while loop and switch


statement

Let's create a Calculator program using do while loop and switch case statement in C

program3.c

1. #include <stdio.h>  
2. #include <math.h> 
52
3. #include <stdlib.h>  
4.   
5. int main()  
6. {  
7.     // declaration of local variable op;  
8.     int op, n1, n2;  
9.     float res;  
10.     char ch;  
11.     do  
12.     {  
13.         // displays the multiple operations of the C Calculator  
14.         printf (" Select an operation to perform the calculation in C Calculator: ");  
15.         printf (" \n 1 Addition  \t \t 2 Subtraction \n 3 Multiplication \t 4 Division \n 5 Squar
e \t \t 6 Square Root \n 7 Exit \n \n Please, Make a choice ");      
16.           
17.         scanf ("%d", &op); // accepts a numeric input to choose the operation  
18.       
19.       
20.     // use switch statement to call an operation  
21.     switch (op)  
22.     {  
23.         case 1:  
24.             // Add two numbers  
25.             printf (" You chose: Addition");  
26.             printf ("\n Enter First Number: ");  
27.             scanf (" %d", &n1);  
28.             printf (" Enter Second Number: ");  
29.             scanf (" %d", &n2);  
30.             res = n1 + n2; // Add two numbers  
31.             printf (" Addition of two numbers is: %.2f", res);  
32.             break; // break the function  
33.           
53
    
34.         case 2:  
35.             // Subtract two numbers  
36.             printf (" You chose: Subtraction");  
37.             printf ("\n Enter First Number: ");  
38.             scanf (" %d", &n1);  
39.             printf (" Enter Second Number: ");  
40.             scanf (" %d", &n2);  
41.             res = n1 - n2; // subtract two numbers  
42.             printf (" Subtraction of two numbers is: %.2f", res);  
43.             break; // break the function  
44.               
45.         case 3:  
46.             // Multiplication of the numbers  
47.             printf (" You chose: Multiplication");  
48.             printf ("\n Enter First Number: ");  
49.             scanf (" %d", &n1);  
50.             printf (" Enter Second Number: ");  
51.             scanf (" %d", &n2);  
52.             res = n1 * n2; // multiply two numbers  
53.             printf (" Multiplication of two numbers is: %.2f", res);  
54.             break; // break the function  
55.               
56.         case 4:  
57.             // Division of the numbers  
58.             printf (" You chose: Division");  
59.             printf ("\n Enter First Number: ");  
60.             scanf (" %d", &n1);  
61.             printf (" Enter Second Number: ");  
62.             scanf (" %d", &n2);  
63.             if (n2 == 0)  
64.                 {  
54

65.                     printf (" \n Divisor cannot be zero. Please enter another value "); 
 

66.                     scanf ("%d", &n2);   
67.      
68.                 }  
69.             res = n1 / n2; // divide two numbers  
70.             printf (" Division of two numbers is: %.2f", res);  
71.             break; // break the function  
72.               
73.         case 5:  
74.             // getting square of a number  
75.             printf (" You chose: Square");  
76.             printf ("\n Enter First Number: ");  
77.             scanf (" %d", &n1);  
78.   
79.             res = n1 * n1; // get square of a number  
80.             printf (" Square of %d number is: %.2f", n1, res);  
81.             break; // break the function  
82.               
83.         case 6:  
84.             // getting the square root of the number  
85.             printf (" You chose: Square Root");  
86.             printf ("\n Enter First Number: ");  
87.             scanf (" %d", &n1);  
88.               
89.             res = sqrt(n1); // use sqrt() function to find the Square Root   
90.             printf (" Square Root of %d numbers is: %.2f", n1, res);  
91.             break; // break the function  
92.               
55
        case 7:  
93.             printf (" You chose: Exit");  
94.             exit(0);   
95.             break; // break the function  
96.               
97.         default:  
98.             printf(" Something is wrong!! ");  
99.             break;                        
100.     }  
101.     printf (" \n \n ********************************************** \n ");  
102.     } while (op != 7);  
103.   
104.     return 0;        
105. }  

Output:
56

FINAL PROGRAM CODE-:

1. #include <stdio.h>  
2. int main()  
3. {  
4.     // declare local variables  
5.     char opt;  
6.     int n1, n2;   
7.     float res;  
8.     printf (" Choose an operator(+, -, *, /) to perform the operation in C Calculator \n ");  
9.     scanf ("%c", &opt); // take an operator  
10.     if (opt == '/' )  
11.     {  
12.         printf (" You have selected: Division");  
13.     }  
14.     else if (opt == '*')  
15.     {  
16.         printf (" You have selected: Multiplication");  
17.      }  
18.        
19.     else if (opt == '-')  
20.     {  
21.         printf (" You have selected: Subtraction");  
22.      }  
23.         else if (opt == '+')  
24.     {  
25.         printf (" You have selected: Addition");  
26.      }     
27.     printf (" \n Enter the first number: ");  
28.     scanf(" %d", &n1); // take fist number 
57

29.     printf (" Enter the second number: ");  
30.     scanf (" %d", &n2); // take second number  
31.       
32.     switch(opt)  
33.     {  
34.         case '+':  
35.             res = n1 + n2; // add two numbers  
36.             printf (" Addition of %d and %d is: %.2f", n1, n2, res);  
37.             break;  
38.           
39.         case '-':  
40.             res = n1 - n2; // subtract two numbers  
41.             printf (" Subtraction of %d and %d is: %.2f", n1, n2, res);  
42.             break;  
43.               
44.         case '*':  
45.             res = n1 * n2; // multiply two numbers  
46.             printf (" Multiplication of %d and %d is: %.2f", n1, n2, res);  
47.             break;            
48.           
49.         case '/':  
50.             if (n2 == 0)   // if n2 == 0, take another number  
51.             {  
52.                 printf (" \n Divisor cannot be zero. Please enter another value ");  
53.                 scanf ("%d", &n2);        
54.                 }  
55.             res = n1 / n2; // divide two numbers  
56.             printf (" Division of %d and %d is: %.2f", n1, n2, res);  
57.             break;  
58.         default:  /* use default to print default message if any condition is not satisfied */  
58

59.             printf (" Something is wrong!! Please check the options ");               
60.     }  
61.     return 0;  
62. }  
63. #include <stdio.h>  
64. int main()  
65. {  
66.     // declare local variables  
67.     char opt;  
68.     int n1, n2;   
69.     float res;  
70.     printf (" Select an operator (+, -, *, /) to perform an operation in C calculator \n ");  
71.     scanf ("%c", &opt); // take an operator  
72.     printf (" Enter the first number: ");  
73.     scanf(" %d", &n1); // take fist number  
74.     printf (" Enter the second number: ");  
75.     scanf (" %d", &n2); // take second number  
76.       
77.     if (opt == '+')  
78.     {  
79.         res = n1 + n2; // add two numbers  
80.         printf (" Addition of %d and %d is: %f", n1, n2, res);  
81.     }  
82.       
83.     else if (opt == '-')  
84.     {  
85.         res = n1 - n2; // subtract two numbers  
86.         printf (" Subtraction of %d and %d is: %f", n1, n2, res);  
87.     }  
88.      
59

89.     else if (opt == '*')  
90.     {  
91.         res = n1 * n2; // multiply two numbers  
92.         printf (" Multiplication of %d and %d is: %f", n1, n2, res);  
93.     }  
94.       
95.     else if (opt == '/')  
96.     {  
97.         if (n2 == 0)   // if n2 == 0, take another number  
98.         {  
99.             printf (" \n Divisor cannot be zero. Please enter another value ");  
100.             scanf ("%d", &n2);        
101.         }  
102.         res = n1 / n2; // divide two numbers  
103.         printf (" Division of %d and %d is: %.2f", n1, n2, res);  
104.     }  
105.     else  
106.     {  
107.         printf(" \n You have entered wrong inputs ");  
108.     }  
109.     return 0;  
110. }  
111. #include <stdio.h>  
112. #include <math.h>  
113. #include <stdlib.h>  
114.   
115. int main()  
116. {  
117.     // declaration of local variable op;  
118.     int op, n1, n2;  
119.     float res; 
60
120.     char ch;  
121.     do  
122.     {  
123.         // displays the multiple operations of the C Calculator  
124.         printf (" Select an operation to perform the calculation in C Calculator: ");  
125.         printf (" \n 1 Addition  \t \t 2 Subtraction \n 3 Multiplication \t 4 Division \n 
5 Square \t \t 6 Square Root \n 7 Exit \n \n Please, Make a choice ");      
126.           
127.         scanf ("%d", &op); // accepts a numeric input to choose the operation  
128.       
129.       
130.     // use switch statement to call an operation  
131.     switch (op)  
132.     {  
133.         case 1:  
134.             // Add two numbers  
135.             printf (" You chose: Addition");  
136.             printf ("\n Enter First Number: ");  
137.             scanf (" %d", &n1);  
138.             printf (" Enter Second Number: ");  
139.             scanf (" %d", &n2);  
140.             res = n1 + n2; // Add two numbers  
141.             printf (" Addition of two numbers is: %.2f", res);  
142.             break; // break the function  
143.               
144.         case 2:  
145.             // Subtract two numbers  
146.             printf (" You chose: Subtraction");  
147.             printf ("\n Enter First Number: ");  
148.             scanf (" %d", &n1);  
149.             printf (" Enter Second Number: ");  
61

150.  scanf (" %d", &n2); 
151.             res = n1 - n2; // subtract two numbers  
152.             printf (" Subtraction of two numbers is: %.2f", res);  
153.             break; // break the function  
154.               
155.         case 3:  
156.             // Multiplication of the numbers  
157.             printf (" You chose: Multiplication");  
158.             printf ("\n Enter First Number: ");  
159.             scanf (" %d", &n1);  
160.             printf (" Enter Second Number: ");  
161.             scanf (" %d", &n2);  
162.             res = n1 * n2; // multiply two numbers  
163.             printf (" Multiplication of two numbers is: %.2f", res);  
164.             break; // break the function  
165.               
166.         case 4:  
167.             // Division of the numbers  
168.             printf (" You chose: Division");  
169.             printf ("\n Enter First Number: ");  
170.             scanf (" %d", &n1);  
171.             printf (" Enter Second Number: ");  
172.             scanf (" %d", &n2);  
173.             if (n2 == 0)  
174.                 {  
175.                     printf (" \n Divisor cannot be zero. Please enter another value ");  
176.                     scanf ("%d", &n2);        
177.                 }  
178.             res = n1 / n2; // divide two numbers  
179.             printf (" Division of two numbers is: %.2f", res);  
180.             break; // break the function                
62
181.  case 5:  
182.             // getting square of a number  
183.             printf (" You chose: Square");  
184.             printf ("\n Enter First Number: ");  
185.             scanf (" %d", &n1);  
186.   
187.             res = n1 * n1; // get square of a number  
188.             printf (" Square of %d number is: %.2f", n1, res);  
189.             break; // break the function  
190.               
191.         case 6:  
192.             // getting the square root of the number  
193.             printf (" You chose: Square Root");  
194.             printf ("\n Enter First Number: ");  
195.             scanf (" %d", &n1);  
196.               
197.             res = sqrt(n1); // use sqrt() function to find the Square Root   
198.             printf (" Square Root of %d numbers is: %.2f", n1, res);  
199.             break; // break the function  
200.               
201.         case 7:  
202.             printf (" You chose: Exit");  
203.             exit(0);   
204.             break; // break the function  
205.               
206.         default:  
207.             printf(" Something is wrong!! ");  
208.             break;                        
209.     }  
210.     printf (" \n \n ********************************************** \n ");  
211.     } while (op != 7);  
63
212.     return 0;        
213. }  

214. #include <stdio.h>  
215. #include <conio.h>  
216. #include <math.h>  
217. #include <stdlib.h>  
218.       
219. // function declarations   
220. int addition();  
221. int subtract();  
222. int multiply();  
223. int divide();  
224. int sq();  
225. int sqrt1();  
226. void exit();  
227.   
228. int main()  
229. {  
230.     // declaration a local variable op;  
231.     int op;  
232.     do  
233.     {  
234.         // displays the multiple operations of the C Calculator  
235.         printf (" Select an operation to perform the calculation in C Calculator: ");  
236.         printf (" \n 1 Addition  \t \t 2 Subtraction \n 3 Multiplication \t 4 Division \n 
5 Square \t \t 6 Square Root \n 7 Exit \n \n Please, Make a choice ");      
237.           
238.         scanf ("%d", &op); // accepts a numeric input to choose the operation  
239.       

64
240.     // use switch statement to call an operation  
241.     switch (op)  
242.     {  
243.         case 1:  
244.             addition(); /* It call the addition() function  to add the given numbers */  
245.             break; // break the function  
246.               
247.         case 2:  
248.             subtract(); /* It call the subtract() function  to subtract the given numbers *
/  
249.             break; // break the function  
250.               
251.         case 3:  
252.             multiply(); /* It call the multiply() function  to multiply the given numbers 
*/  
253.             break; // break the function  
254.               
255.         case 4:  
256.             divide(); // It call the divide() function  to divide the given numbers  
257.             break; // break the function  
258.               
259.         case 5:  
260.             sq(); // It call the sq() function  to get the square of given numbers  
261.             break; // break the function  
262.               
263.         case 6:  
264.             sqrt1(); /* It call the sqrt1() function  to get the square root of given numbe
rs */  
265.             break; // break the function  
266.               
      
65
267.   case 7:  
268.             exit(0); // It call the exit() function  to exit from the program  
269.             break; // break the function  
270.               
271.         default:  
272.             printf(" Something is wrong!! ");  
273.             break;                        
274.     }  
275.     printf (" \n \n ********************************************** \n ");  
276.     } while (op != 7);  
277.       
278.   
279.     return 0;        
280. }  
66

You might also like