0% found this document useful (0 votes)
158 views28 pages

Techno Main Salt Lake: Group Number-A.7

The document describes a mini calculator project created by a group of students for their C language class. The project involved creating a menu-driven program that allows users to perform basic mathematical operations like addition, subtraction, multiplication, division, and more. The summary provides an overview of the key sections and functions of the mini calculator program.

Uploaded by

SHAMINDRA SEN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views28 pages

Techno Main Salt Lake: Group Number-A.7

The document describes a mini calculator project created by a group of students for their C language class. The project involved creating a menu-driven program that allows users to perform basic mathematical operations like addition, subtraction, multiplication, division, and more. The summary provides an overview of the key sections and functions of the mini calculator program.

Uploaded by

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

TECHNO MAIN SALT LAKE

MINI PROJECT ON MINI CALCULATOR

GROUP NUMBER-A.7
SHAMINDRA SEN (13000318056)
SHIRSENDU ACHARYA (13000318054)
SHRABANTI BANERJEE (13000318052)
SHOMIK MITRA (13000318053)
SHASHANK SHEKHAR (13000318055)

GUIDED BY- Mr. UTPAL DAS


ACKNOWLEDGMENT
First and the foremost we would like to thank the
Almighty for his blessings which helped us in smoothly
completing this project. We express our special thanks
of gratitude to our computer teacher, friends and
others who have given an unending support and
helped us in numerous ways since the first stage of the
assignment.
We duly acknowledge the contribution of our computer
teacher Mr. Utpal Das sir for his invaluable help in
Coding and beneficial inputs and guidance.

Formulating, designing and executing the mini


calculator project was an uphill task and would not
have been possible without proper and timely
assistance of Mr. Utpal Das sir.
We would also thanks to all our friends for forwarding
their suggestions to make necessary modifications.

-Thank you
PROBLEM
STATEMENT
To create an menu driven program based
on C language which will enable the user
to compute basic mathematical
operations thereby fulfilling the purpose
of a mini calculator.
SCOPE OF THE PROJECT

★ To calculate the basic calculator


operations.
★ Highly interactive and easy to access .
★ Low system specification.
★ Fast and efficient.
TABLE OF CONTENT
➢ INTRODUCTION
➢ BASIC FUNCTIONS

➢ PROPOSED SYSTEM
➢ SOURCE CODE ANALYSIS:
○ Description of each functionalities and their
scope.
➢ TEST CASES AND RESULTS
➢ CONCLUSION

➢ REFERENCES
INTRODUCTION
➢ The first mainframe computers, using
firstly vacuum tubes and later transistors in the
logic circuits, appeared in the 1940s and 1950s.
This technology was to provide a stepping stone
to the development of electronic calculators.
➢ The calculator was written by Rolf Howarth in
early 1996.
➢ It was a fully featured calculator with proper
operator precedence is implemented, including
trig functions and logarithms, factorials, 12 levels
of parentheses, logs to base 2 (a handy function
for informationentropists!), bitwise logical
operators, hex, octal, binary and ASCII display.
BASIC FUNCTIONS

➢ADDITION ➢POWER
➢SUBTRACTION ➢FACTORIAL
➢MULTIPLICATION ➢LOGARITHM
➢DIVISION ➢SQUARE ROOT
➢MODULUS ➢TRIGONOMETRIC FUNCTIONS
BASIC FUNCTIONS PROVIDED
❖ Addition:-
The addition (sum function) is used by clicking on the“+" button
using the keyboard. The function results in a+b.
❖ Subtraction:-
The subtraction (minus function) is used by clicking on the button
using the keyboard. The function results in (a-b).
❖ Multiplication:-
The multiplication (times function) is used by clicking on the "x"
button using the keyboard * key. The function results in a*b.
❖ Division:-
The division (divide function) is used by clicking on the / button or
using the keyboard “/” key. The function results in a/b.
❖ Power:-
The power function is used by clicking on the ^ button on
keyboard. The function results in power of a number as a^b.
❖ Modulus:-
The modulus is used by pressing on the“?" button using the
keyboard. The function results in a%b.
❖ Factorial:-
The factorial is used by clicking on the“!" button using the
keyboard. The function results in a!.
❖ Logarithm:-
The lograithm is used by clicking on the“l" button using the
keyboard.
❖ Square root:-
The square root is used by clicking on the“r" button using the
keyboard. The function results in √a.
❖ Trigonometric functions:-
The trigonometric functions are used by clicking on the“$" button
using the keyboard.
PROPOSED SYSTEM
The foremost thing that is taken care of is the Need and
Requirements of the User. Before developing software we keep
following things in mind so that we can develop powerful and quality
software Problem Statement was to design a module-
★ Which is user friendly.
★ Which will help user in viewing his data and privileges.
★ Which will help the administrator to handle all the changes.
FUNCTIONS TO BE PROVIDED:
★ The system will be user friendly and completely menu driven so that
the users shall have no problem in using all options .The system will
be efficient and fast in response The system will be customized
according to needs.
SYSTEM REQUIREMENTS(Minimum):-
★ Operating system : MS Windows XP or Windows Vista or ubuntu
★ Language: C Language
★ Processor: Pentium IV Processor RAM: 512 MB Hard disk: 1 GB
SOURCE CODE ANALYSIS
Header Files Used In The Program :
1) stdio.h or Standard Input Output Header File
2 )conio.h or Console Input Output Header File
3 ) stdlib.h or Standard Library Header File
4 ) math.h or Mathematical Header File

Overall Functions Used In The Program :


The functions used are of two types
1)User defined
2)System defined functions
User defined functions used are -

Void and integer are the two data


types used to define the functions .
We would like to define the work of
each of them with the progression of
the slides .

System defined functions used are-


Describing the main body part of the program
The program execution starts from the main function

Under the main function we have declared the integer variable X and initiated
it to 1 and two character variable Calc_oprn and op ; (for operand and options
respectively ).
On the very next line we have called our very first function i.e. intro function .
Function 1 – intro()
❖ The body part of the function .

So basically it shows the basic information of the whole program , a block of


basic printing statements welcoming the user . The interesting part is the
system function.
Using system(), we can execute any command that can run on terminal if
operating system allows.
For e.g. system(“pause”) allows us to pause the terminal screen while
execution , as pause is a valid dos command , which will wait until a character
is given by the user ,
➢ Pause command in dos terminal :
➢ Like any function when the execution of the function is ended ,the console returns to
the position of the program from where the function was called.
➢ So it’s time to look back the main function .
➢ After returning to the initial position , the next line is executed ,which is the print
function , and then important is to know that getch()or get character function ,
using it we are getting a character from the user and assigning our character in the
variable named op . typically in concern to our program you need to enter either
character h or character q . after getting the character with execution of our next line
the switch case concept is introduced .
➢ The Switch Case Concept :
➢ Now the switch case is the replacement of the if-else ladder.
➢ First it says switch(op) , as there are no condition checking the statement is
always true , so our execution enters into the switch block to check various cases.
➢ Now if the op is equals to the “H” or “h” then our next function
calculator_operation()(about to discuss shortly) is executed and after the
execution the break statement is executed .
➢ When a break statement is reached, the switch terminates, and the flow of control
jumps to the next line following the switch statement.
➢ If the user entered “C” or “c” instead of “H” or “h” then the second set of cases will
execute to encounter the exit statement.
➢ The exit statement will exit the entire program.
➢ If the entered character is neither of the two set of cases then default statement will
execute.
➢ Function 2- calculator_operation()
➢ This function is used to show all the available features of this program
ranging from basic +,-,*,/ to factorial ,modulus operation and many more
❖ The following are the various features within the switch case
containing the
❖ Functioncalculator_operator()
Explaining the features used above in switch
case:
➢ addition() :
the above function is used to add the given elements. The number of
elements are asked and then the required numbers are taken which need to
be added.

➢ subtraction() :
The above function is used to give the difference of two given numbers.
➢ multiplication():
Two required numbers are given by the user which are then multiplied
using above function.

➢ division():
the required two numbers are entered by the user where the first number is divided
by the second number using the above function.
➢ modulus():
Two required numbers are given by the user which are then divided
and then remainder is obtained using the above function.

➢ power():
The number and the power to which it is to be raised is provided by the user
and thus the power of the above number is carried out by the above function.
➢ factorial():
A number is been provided by the user whose factorial is to be found. First
the number is checked if the number is negative it won’t print the factorial
but if he number is 0 or positive the required factorial is printed using the
above function.

➢ loga():
A required number is been entered by the user whose logarithmic value is to be found
using the above function.
➢ sq_root():
the required number is provided by the user whose square is done by using
the above function.

➢ trig ():
This function has multiple parts. Initially it declares series of character and
integer variables as shown in the figure.
In this trigonometric program we have considered only sine ,cosine, and tan function . to get
the choise from the user we used our character variable o using getche() function . and with
the series of print statement it is clear that user nead to press “s”,”c”,”t” to use the sin, cosine,
tan functions respectively.
Now after getting the respective character from the user it is inevitable to
use the switch case statements for the remaining purpose .we are showing
only the sin part of the case statement .

Under this case we are taking the value of angle from the user (in degree) and storing the value
in the variable ‘a’ as declared earlier , and converting the whole value of a to radian . then
calculating the value of sin of that angle to the variable b and then printing it at the end .
subsequently the case of cosine and tan are applied and at the end a default statement is used .

After the single pass , the program will ask the user to continue with the program , answerable
in ‘y’ or ‘n’ . if the user says yes then the program will proceed with the while loop or the other
two conditions will be applicable .
TEST CASES AND RESULTS
CONCLUSION
❖ With the execution of all the featured function in the program as
demanded by the user, the program returns a 0 to the main function
implying the program to be a successful one.
❖ The program written taking care of preparing simple user interface,
optimum functions and appropriate validations. Creativity and
original thoughts was used to code the entire program.
❖ The various features that can enhance the program are-
➢ Including other functions that can perform various advanced
scientific calculations.
➢ Use of Data file handling options to store already calculated
data and giving users the opportunity to view and access
history.
➢ Use of structures and pointers for reducing time complexity and
saving memory.
➢ Using graphic design modules for making the user interface
more attractive and user friendly.
➢ But due to the lack of proper skills these could not be achieved.
We tried our best as a team to make the project user friendly and
error free.
REFERENCES
❖ https://www.slideshare.net
❖ https://www.google.com
❖ https://www.wikipedia.com
❖ https://www.Includehelp.com
❖ Books on C programming
❖ Teacher’s Support

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy