PIC MICRO PROJECT (Mini Calculator)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

DILKAP RESEARCH INSTITUTE OF ENGINEERING & MANAGEMENT


STUDIES(POLYTECHNIC)

MICRO PROJECT
Academic year: 2022-2023

TITLE OF PROJECT

MINI CALCULATOR

Program: COMPUTER Program code:22226

Course- Programming in ‘C’

1
ANNEXURE-I

A MICRO PROJECT ON “MINI CALCULATOR”

Aims/Benefits of the micro project


To know how to create a mini calculator in C language

To get information about C Programming

Gain knowledge about the structures of the C language

Course Outcome address

➢ ➢
Develop ‘C’ programs using a control structure
Develop ‘C’ programs using while and if.

Proposed Methodology

i. Focused on the selection of an appropriate topic for the microproject.


ii. Select the topic i.e. To prepare a report on Mini Calculator
program in ‘C’.
iii. Brief study on our topic.
iv. Gather all information based on topic of the micro project.
v. Analysis and study of our topic in details.

2
ACTION PLAN:-

Sr. No. Detail of activity Plan start Plan finish Name of


date date responsible
team
members

Sam Godson
1 Searching the topic for micro-project

2 collect information from the internet and textbook Sam Godson

collect information from the Programming in C Mayur


3
22226 reference book, and Debugged the errors. Wahurwagh

Harshul
4 arrange all information in ms word
Kadam

Parth
5 Prepare a report on it using MS word
Telavane
Mehul
Chopade

6 print micro project

3
RESOURCED USED:-

Sr. no. Name of Specifications Quantity


resource
material

8 GB RAM,
1 Laptop Windows 11 1
OS

2 Internet Earthsave.net

1
Related Post: Business Communication
Using Computer 22009 MSBTE Micro Project
Textbook/ Programming in
3
Manual C 22226

4
BRIEF INTRODUCTION:-

• C Program to Make a Simple Calculator Using


switch...case

• A calculator is a device that performs arithmetic


operations on numbers. Basic calculators can do
only addition, subtraction, multiplication and
division mathematical calculations.
• In this example, you will learn to create a simple
calculator in C programming using the switch
statement.
• To understand this example, you should have the
knowledge of the following C programming topics:
1. C switch Statement
2. C break and continue
• This program takes an arithmetic operator +, -, *,
/ and two operands from the user. Then, it
performs the calculation on the two operands
depending upon the operator entered by the user.
• The * operator entered by the user is stored in op.
And, the two operands, 8 and 2 are stored
in first and second respectively.
Since the operator * matches case '*'

5
• Programmable calculators are
calculators that can automatically carry
out a sequence of operations under
control of a stored program.
• Most are Turing complete, and, as
such, are theoretically general-purpose
computers.
• However, their user interfaces and
programming environments are
specifically tailored to make performing
small-scale numerical computations
convenient, rather than general-
purpose use.

6
CODE:-
#include <stdio.h>
int main() {
char op;
double first, second;
printf("Enter an operator (+, -, *, /): ");
scanf("%c", &op);
printf("Enter two operands: ");
scanf("%lf %lf", &first, &second);
switch (op) {
case '+':
printf("%.1lf + %.1lf = %.1lf", first, second, first + second);
break;
case '-':
printf("%.1lf - %.1lf = %.1lf", first, second, first -
second); break;
case '*':
printf("%.1lf * %.1lf = %.1lf", first, second, first *
second);
break;
case '/':
printf("%.1lf / %.1lf = %.1lf", first, second, first /
second); break;
// operator doesn't match any case
constant default:
printf("Error! operator is not correct");
}
return 0;
}

7
OUTPUT : -

8
ACTUAL RESOURCES USED:-

Sr. no. Name of resource material Specifications Quantity

1 Laptop 8 GB RAM, Windows 11 OS 1

2 Internet Earthsave.net

textbook/manua Programming in C
3 l 22226 1

SKILL DEVELOPMENT:-

1. Teamwork
2. Communication skills
3. Able to get all information about C language and how
to create mini calculator in ‘C’

You might also like