You are on page 1of 19

A

Micro-Project
On

Matrix And Simple


Calculator
Submitted To
MSBTE
In Partial Fulfillment of Requirement of
Diploma in Computer Engineering
Under I Scheme
Submitted By

Mr. Omkar Sainath Ludbe.


Mr. Suyash Satish Kerkar.
Mr. Avadhut Ratnadip Kamtekar.
Mr. Nandkishor Ashish Khobrekar.
Mr. Atharva Abhay Khadilkar.
Mr. Sanket Suresh Kamtekar.

Under the Guidance Of


Prof. Miss. S.R.Teli
FOR ACADEMIC YEAR 2021-2022
YASHWANTRAO BHONSALE POLYTECHNIC, SAWANTWADI.

PCI MICROPROJECT BY GROUP NO.4


MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION

CERTIFICATE

This is to certify that: -

Mr. Avadhut Ratnadip Kamtekar. Roll No.33


Mr. Sanket Suresh Kamtekar. Roll No.34
Mr. Suyash Satish Kerkar. Roll No.36
Mr. Atharva Abhay Khadilkar. Roll No.37
Mr.Nandkishor Ashish Khobrekar. Roll No.38
Mr.Omkar Sainath Ludbe. Roll No.39

Of Second semester of diploma in COMPUTER ENGINEERING Of institute


Yashwantrao Bhonsale Polytechnic (1742) have completed the Micro Project
satisfactorily in subject Programming In C (22226) for the academic year 2021
to 2022 as prescribed in the curriculum.

………………. ………………... ………………..


Subject Faculty HOD Principal

Seal Of

Institution

PCI MICROPROJECT BY GROUP NO.4


INDEX

Sr. CONTAIN Page


No. No.
1. INTRODUCTION
2. ABSTRACT
3. PROBLEM STATEMENT
4. MOTIVATION
5. HARDWARE AND SOFTWARE REQUREMENT
6. ALL ABOUT ‘C’ LANGUAGE
7. CODE OF THE PROGRAMME
8. THE OUTPUT (fig.1)
9. THE OUTPUT (fig.2)
10. CONCLUSION
11. REFERENCE

PCI MICROPROJECT BY GROUP NO.4


INTRODUCTION:
A Calculator is a small electronic device used to perform various arithmetic
operations like addition, subtraction, multiplication, division. It makes our calculations
easier and faster. You will also be able to calculate addition, subtraction, multiplication,
division, of two matrices have dimension size 2×2having any rows and column.This
system is an attempt to make calculations easier in a user-friendly environment. It is a
very effective and simple understanding of beginners.
In this project, we made a “Matrix And Simple Calculator” using C which will
perform the task of calculating just numbers or matrices on the input from the user.
Easy to use for any person.

ABSTRACT:

To make this program possible, we have used C programming language. The


user can enter any numbers and add, subtract, multiply, divide or perform
matrix calculations using elements for each row and column. Then he/she has to
enter number or rows and columns in case of matrices. After this, the Calculator displays
the total of the calculation. The project is simple to understand, and the source code has
been presented in an understandable manner. Also, this Micro-Project is easy to operate
and understand by the users.

PROBLEM STATEMENT:
A simple calculator program in C which will perform basic arithmetic
operations like addition, subtraction, multiplication, division, and remainder depending
on the input from the user. Users will have the choice to choose the operation. If the
user chooses the wrong operation then he/she will get an error message. It is a very
effective and simple understanding of beginners.

PCI MICROPROJECT BY GROUP NO.4


MOTIVATION:
Although the existing system also provide computer oriented solutions to get the matrix
multiplications results but the existing system cannot be used for different sizes.It cannot be
used for those matrix whose index sizes various and this system can only be used for those
matrix whose index sizes are of two dimension. You will also be able to calculate
multiplication of two matrices have dimension size 2×2. But you cannot able to get results
on matrices having size greater then 2, so you will not able to check your result at a time.
The existing system also not able to display the entered elements while displaying the final
results, so that user can verify their entered data.

HARDWARE AND SOFTWARE REQUREMENTS:


• Hardware used :-
Intel i3 Processor, 4GB RAM, 512GB SSD, Windows 11

• Software used :-
Turbo C

PCI MICROPROJECT BY GROUP NO.4


ALL ABOUT ‘C’ LANGUAGE:

➢ Introduction To C
C is a general-purpose high-level language that was originally developed by Dennis
Ritchie for the Unix operating system. It was first implemented on the Digital
Equipment Corporation PDP-11 computer in 1972.
The Unix operating system and virtually all Unix applications are written in the C
language. C has now become a widely used professional language for various reasons.
• Easy to learn
• Structured language
• It produces efficient programs.
• It can handle low-level activities.
• It can be compiled on a variety of computers.

➢ History Of C Language

C programming language was developed in 1972 by Dennis Ritchie at bell laboratories


of AT&T (American Telephone & Telegraph), located in the U.S.A.

Dennis Ritchie is known as the founder of the c language.

It was developed to overcome the problems of previous languages such as B, BCPL,


etc.

Initially, C language was developed to be used in UNIX operating system. It inherits


many features of previous languages such as B and BCPL.

PCI MICROPROJECT BY GROUP NO.4


❖ Application Of C Language:

Operating Systems:-
The first operating system to be developed using a high-level programming language
was UNIX, which was designed in the C programming language. Later on, Microsoft
Windows and various Android applications were scripted in C.

➢ Embedded Systems

The C programming language is considered an optimum choice when it comes


to scripting applications and drivers of embedded systems, as it is closely related
to machine hardware.

➢ Gui

GUI stands for Graphical User Interface. Adobe Photoshop, one of the most
popularly used photo editors since olden times, was created with the help of C.
Later on, Adobe Premiere and Illustrator were also created using C.

➢ New Programming Platforms


Not only has C given birth to C++, a programming language including all the
features of C in addition to the concept of object-oriented programming but,
various other programming languages that are extensively used in today’s world
like MATLAB and Mathematica. It facilitates the faster computation of
programs.

PCI MICROPROJECT BY GROUP NO.4


❖ Features of c language:

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

PCI MICROPROJECT BY GROUP NO.4


❖ Advantage of C language:

1. Easy to learn: C is a very easy to learn middle level language for expressing ideas in
programming in a way that most people are comfortable with.

2. Low-level Language Support: C is reasonably close to assembly machine. It supports


features like pointers, bytes and bit level manipulation. C allows the programmer to
write directly to memory. C structures, pointers and arrays are designed to structure
and manipulate memory in an efficient, machine-independent fashion. It is generally
used to create hardware devices, OS, drivers, kernels etc.

3. Structured programming language: A structured programming language breaks and


abstract a program into small logical components which are responsible for performing
a specific task. C's main structural components are functions or subroutines. It makes
the program easier to understand and modify.

4. Produces efficient programs: C is a compiled programming language, which creates


fast and efficient executable files. It also provides a set of library functions for
common utilities. C provides a lot of inbuilt functions that makes the development
fast.

5. Produces portable programs: C language produces portable programs; they can be


run on any compiler with little or no modifications. One of the main strengths of C is
that it combines universality and portability across various computer architectures.

6. Powerful programming language: C language provides a wide variety of inbuilt data


types and ability to create custom data types using structures. It also provides a large
set of commonly used Input/Output, Mathematical, String etc, related functionsas C
standard library. C has a rich set of control statements, arithmetic operators, loops etc
which provides a powerful tool for programmer to implement his logic as aC program.

PCI MICROPROJECT BY GROUP NO.4


❖ Disadvantages of C language:

1. Concept of OOP: C s is a very vast language, but it does not support the concept of
OOPs (Inheritance, Polymorphism, Encapsulation, Abstraction, Data Hiding). C
simply follows the procedural programming approach.
2. Run-time checking In: the C programming language, the errors or the bugs aren’t
detected after each line of code. Instead, the compiler shows all the errors after writing
the program. It makes the checking of code very complex in large programs.
3. Concept of namespace: C does not implement the concept of namespaces. A
namespace is structured as a chain of commands to allow the reuse of names in
different contexts. Without namespaces, we cannot declare two variables of the same
name. But, C programming lacks in this feature, and hence you cannot define a
variable with the same name in C.
4. Lack of Exception Handling: Exception Handling is one of the most important
features of programming languages. While compiling the code, various anomalies and
bugs can occur. Exception Handling allows you to catch the error and take appropriate
responses. However, C does not exhibit this important feature.
5. Constructor or destructor: C does not have any constructor or destructor.
Constructors& Destructors support basic functionality of Object-Oriented
Programming. Both are member functions that are created as soon as an object of the
class is created. You will be studying constructor and destructor in detail later on.
6. Low level of abstraction: C is a small and core machine language that has minimum
data hiding and exclusive visibility that affects the security of this language.

PCI MICROPROJECT BY GROUP NO.4


Matrix AND Simple
Calculator
PROGRAMME IN C

CODE OF THE PROGRAMME:

#include <stdio.h>
int main()
{
int a[2] [2], b[2] [2], c[2] [2];
int i,j,n1,n2,ch,ch1,ch2;
clrscr();
printf("\nEnter your choice:");
printf("\n1.Matrix calculation\n2.Simple calculation");
scanf("%d",&ch);
switch (ch)
{
case 1 :
do
{
printf("\nMatrix calculations:");
printf("\n****MENU****");
printf("\n1.addition\n 2.substraction\n 3.multiplication\n 4.division\n 5.Exit");
printf("\n Enter Choice");
scanf("%d",&ch1);
printf("Enter value of first matrix");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{

PCI MICROPROJECT BY GROUP NO.4


printf("Enter value %d row and %d col",i,j);
scanf("%d",& a[i] [i]);
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("Enter value %d row and %d col",i,j);
scanf("%d",& b[i] [i]);
}
}

switch(ch1)
{
case 1: printf("Addition=\n");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c [i] [j] = a[i] [j] + b[i] [j];
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d\t", c[i] [j]);
}
printf("\n");
}
break;

PCI MICROPROJECT BY GROUP NO.4


case 2: printf("Substraction=\n");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c [i] [j] = a[i] [j] - b[i] [j];
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d\t", c[i] [j]);
}
printf("\n");
}
break;

case 3: printf("Multiplication=\n");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c [i] [j] = a[i] [j] * b[i] [j];
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d\t", c[i] [j]);
}
printf("\n");
}
PCI MICROPROJECT BY GROUP NO.4
break;

case 4: printf("Division=\n");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c [i] [j] = a[i] [j] / b[i] [j];
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d\t", c[i] [j]);
}
printf("\n");
}
break;

default:printf("Enter correct choice");


}
printf("\n\nEnter '5' to do more calculatios");
scanf("%d",&ch1);
}while(ch1==5);
break;

case 2 :
printf("Simple Calculatios:");
printf("\n***MENU***");
printf("\n1.Addition\n2.Substraction\n3.Multiplication\n4.Division");
printf("\nEnter your choice:");
scanf("%d",&ch2);
if(ch2>=1 && ch<=4)
PCI MICROPROJECT BY GROUP NO.4
{
printf("\nEnter two values:");
scanf("%d %d",&n1,&n2);
}
switch(ch2)
{
case 1 : printf("\nAddition=%d",n1+n2);
break;
case 2 : printf("\nSubstraction=%d",n1-n2);
break;
case 3 : printf("\nmultiplication=%d",n1*n2);
break;
case 4 : printf("\ndivision=%d",n1/n2);
break;
default : printf("\nEnter correct choice");
}

}
getch();
return 0;
}

PCI MICROPROJECT BY GROUP NO.4


Output

THE OUTPUT (fig.1) :–

THE OUTPUT (fig.2) :–

PCI MICROPROJECT BY GROUP NO.4


THE OUTPUT (fig.3) :–

THE OUTPUT (fig.4) :-

PCI MICROPROJECT BY GROUP NO.4


THE OUTPUT (fig.5) :–

PCI MICROPROJECT BY GROUP NO.4


CONCLUSION:
In this way have prepared microproject on Matrix AND Simple Calculator with using
C while doing this project, we worked in a group. The reason behind to choose the
PCI(Programming In C) Micro project on Matrix AND Simple Calculator because in
today’s life we can see most of calculation is a deliberate process that transforms one
or more inputs into one or more results. The term is used in a variety of senses, from
the very definite arithmetical calculation of using an algorithm, to the vague heuristics
of calculating a strategy in a competition, or calculating the chance of a successful
relationship between two people.it is useful to all which have to want do some
simple calculation.so it was great experience to work on this project. We learnt
lots of qualities while doing this project.

REFERENCE:

• We referred some Sites:

➢ https://www.javatpoint.com/calculator-program-in-c
➢ https://www.programiz.com
➢ https://www.tutorialgateway.org

• We referred some book:

PCI MICROPROJECT BY GROUP NO.4

You might also like