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

Computer Project

Name:- JAI BHADANA

INTRODUCTION
C programming language is a general-purpose, imperative computer programming language,
supporting structured programming,lexical variable scope and recursion, while a static type
system prevents many unintended operations. By design, C provides constructs that map
efficiently to typical machine instructions, and therefore it has found lasting use in applications
that had formerly been coded in assembly language, including operating systems, as well as
various application software for computers ranging from supercomputers to embedded systems

C was originally developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs and
used to re-implement the Unix operating system.It has since become one of the most widely
used programming languages of all time, with C compilers from various vendors available for
the majority of existing computer architectures and operating systems

TOPIC:- Simple calculater


PROJECT REPORT

a) Hardware specification of machine used :

1) Keyboard : 101 buttons

2) Monitor : VGA/SVGA
3) CPU : Celeron , 1.7 GHz

4) Printer : Inkjet

5) Mouse : Three Button Mouse.

6) FDD : 1.44MB

d) b) Software (OS, Language & packages) used along with version.

1) Operating System : DOS

2) Language : C Language

3) Packages : Not Used

Version :- Turbo C++

c) Objectives achieved Successfully : All the objectives have been achieved successfully
except Option 5th print record.

d) Objectives party achieved :- There is no such condition because all the objectives
have been achieved.

b) b) The hardware and software specification of environment necessary to run


the project.

Minimum req. of Hardware :-

Turbo C++ runs on the IBM PC family of computers,including the XT, AT and
PS/2 along with all true IBM compatibilities.
Turbo C++ required DOS 2.0 or higher and at least 640KB memory. It runs on any 80
column Monitor. The minimum requirement is a hard disk drive and floppy drive.

Software :- Operating System MS DOS 6.22 Turbo


compiler. d) Name of software files
submitted on floppy disk :-along with the topic of there contents.

d.Dat. :- This opens under the concept of File handling and itself-made.

p.dat :- This file contents the actual program,which will generate the Report.

Main.Exe:- This is an executable file. Due TO this we don’ t required compilers

DESCRIPTION OF THE PROGRAM

This step contains the file that is used in the whole program. In this step there is use
of the header files which are as follows :-

1) 1) stidio.h : this stand for standard input output.this describes stdin, stdout,
stdprn and stderr stream which shows the path and level of input & output.
It includes:-

a) scanf() : scan and formats input from the stdin streem.

b) printf() : writes formatted output in stdout (Monitor).

c) fclose() : closes stream.

d) fopen() : opens a stream.

e) fflush() : flushes a stream.


f) fseek() : repositions a file pointer on a stream.

Syntax:- Fseek (file * stream, long offset, whence );

g) fwrite() : write to a stream.

h) gets() : gets a string from striding.

i) puts() : outputs a string to stdoutput.

j) rename() : rename the file.

k) remove() : remove the file .

l) rewind() : reposition a file pointer to the beginning of a string.

2) conio.h : It regulates the different tipes of work related with input /output
in DOS.

a) getch() : gets character from keyboard and doesn’t echo to the screen.

b) getche() : gets character from keyboard and echoes to the screen.

c) gotoxy() : position the cursor in the text window like 1st in column 2nd is low.

d) clrscr() : clear the screen.

3) ctype.h : It gives the information related to character


classification and character conversion in header file.

a) tolower() : translate character to lower case.

4) stdlib.h : It declears the routin which is normal use declares the convertion
path and find it.

a) exit() : terminates program.

5) string.h : It shows different types of string manipulation


and mamory manipulation path.
a) strcmp() : compares on string with another.

Source code

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
clrscr();
float a, b, res;
char choice, ch;
do
{
printf("1.Addition\n");
printf("2.Subtraction\n");
printf("3.Multiplication\n");
printf("4.Division\n");
printf("5.Exit\n\n");
printf("Enter Your Choice : ");
scanf("%c",&choice);
switch(choice)
{
case '1' : printf("Enter two number : ");
scanf("%f%f",&a,&b);
res=a+b;
printf("Result = %f",res);
break;
case '2' : printf("Enter two number : ");
scanf("%f%f",&a,&b);
res=a-b;
printf("Result = %f",res);
break;
case '3' : printf("Enter two number : ");
scanf("%f%f",&a,&b);
res=a*b;
printf("Result = %f",res);
break;
case '4' : printf("Enter two number : ");
scanf("%f%f",&a,&b);
res=a/b;
printf("Result = %f",res);
break;
case '5' : exit(0);
break;
default : printf("Wrong Choice..!!");
break;
}
printf("\n------------------------------------\n");
}while(choice!=5 && choice!=getchar());
getch();
}

Output

BIBLIOGRAPHY
1) 1) “ANSI C” by Balaguruswami.

2) 2) Turbo C by Moolish Cooper.

3) 3) Letus “C” by Kanetkar.

4) 4) Working with “C” by Kanetkar.

5) 5) Programming in “C” by Hemant Goyal

You might also like