Maharashtra State Board of Technical Education, Mumbai: Diploma Computer ENGINEERING
Maharashtra State Board of Technical Education, Mumbai: Diploma Computer ENGINEERING
Maharashtra State Board of Technical Education, Mumbai: Diploma Computer ENGINEERING
A Project Report
On
„CALCULATOR‟
DIPLOMA
In
Computer ENGINEERING
Submitted by
Mr. Shankar Maruti Morti
Mr. Shreyash Tanaji Magdum
Mr. Bhushan Siddhappa Karguppi
Mr. Prathmesh Yashwant Sardesai
1
SANT GAJANAN MAHARAJ RURAL HOSPITAL &RESEARCH CENTER, MAHAGAON
“SANT GAJANAN MAHARAJ RURAL POLYTECHNIC”
A/P –MAHAGAON, SITE –CHINCHEWADI, TAL-GADHINGLAJ, DIST-KOLHAPUR
Certificate
This is to certify that the following students of Fifth semester of Diploma in Computer
Engineering of Institute SANT GAJANAN RURAL POLYTECHNIC, MAHAGAON-416503.(CODE-0965)
has completed Micro project on ‘CALCULATOR’ in subject CSS subject-code(22519) for academic year
2023 to 2024 as prescribed in the curriculum.
2
Table of Content
Table of No
Contents
1 Micro-Project-Annexure-I
2 Micro-Project-Annexure-II
3 Source Code
3
Annexure-I
CALCULATOR
1.0 Rationale
Basic calculators can do only addition, subtraction, multiplication and division mathematical
calculations. However, more sophisticated calculators can handle exponential operations,
square roots, logarithms, trigonometric functions and hyperbolic functions.
The Calculator is a portable device used in our daily life to perform various mathematical
functions such as addition, subtraction, multiplication, division, root, etc. However, we
have scientific or sophisticated calculators used to solve complex tasks such as,we will
create a calculator program in JavaScript.
4
5.0 Action plan
5
6.0Resources Required
6
Annexure-II
CALCULATOR
1.0 Introduction
HTML,CSS and Javascript are used to design the JavaScript Calculator. HTML is used to
design the basic structure of the calculator. CSS styles are used to apply styles on the
calculator and JavaScript is used to add the calculation functionality. Also, Math.js is
used to evaluate the calculations.
7
5.0 Actual Methodology Followed
In this micro-project, first of all we will focus on selection of appropriate topic for
Micro project.
8
Source Code:
!DOCTYPE html>
<html lang = "en">
<head>
<title> JavaScript Calculator </title>
<style>
h1 {
text-align: center;
padding: 23px;
background-color: skyblue;
color: white;
}
#clear{
width: 270px;
border: 3px solid gray;
border-radius: 3px;
padding: 20px;
background-color: red;
}
.formstyle
{
width: 300px;
height: 530px;
margin: auto;
border: 3px solid skyblue;
border-radius: 5px;
padding: 20px;
}
input
{
width: 20px;
background-color: green;
9
color: white;
border: 3px solid gray;
border-radius: 5px;
padding: 26px;
margin: 5px;
font-size: 15px;
}
#calc{
width: 250px;
border: 5px solid black;
border-radius: 3px;
padding: 20px;
margin: auto;
}
</style>
</head>
<body bgcolor="black">
<h1> Calculator Program in JavaScript </h1>
<div class= "formstyle">
<form name = "form1">
<!-- This input box shows the button pressed by the user in calculator. -->
<input id = "calc" type ="text" name = "answer"> <br> <br>
<!-- Display the calculator button on the screen. -->
<!-- onclick() function display the number prsses by the user. -->
<input type = "button" value = "1" onclick = "form1.answer.value += '1' ">
<input type = "button" value = "2" onclick = "form1.answer.value += '2' ">
<input type = "button" value = "3" onclick = "form1.answer.value += '3' ">
<input type = "button" value = "+" onclick = "form1.answer.value += '+' ">
<br> <br>
10
<input type = "button" value = "7" onclick = "form1.answer.value += '7' ">
<input type = "button" value = "8" onclick = "form1.answer.value += '8' ">
<input type = "button" value = "8" onclick = "form1.answer.value += '9' ">
<input type = "button" value = "*" onclick = "form1.answer.value += '*' ">
<br> <br>
</form>
</div>
</body>
</html>
11
12
13
5.0Actual Resources Used
14
6.0 Outputs of Micro-Project
We understood the how calculator works and results the equation.
8.0 References
https://www.w3schools.com/howto/howto_website.asp
https://www.coursera.org/learn/html-css-javascript-for-web-
developers https://www.freecodecamp.org/news/html-css-and-
javascript-explained-for-beginners/
A future value compound interest calculator is a helpful tool for calculating the value of
any investment at a future date. The initial investment, periodic investment, interest rate,
and period number are entered in the future value calculator's formula input box.
15