Techno Main Salt Lake: Group Number-A.7
Techno Main Salt Lake: Group Number-A.7
GROUP NUMBER-A.7
SHAMINDRA SEN (13000318056)
SHIRSENDU ACHARYA (13000318054)
SHRABANTI BANERJEE (13000318052)
SHOMIK MITRA (13000318053)
SHASHANK SHEKHAR (13000318055)
-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
➢ 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
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 .
➢ 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