Professional Documents
Culture Documents
TOPIC:-Simple Calculater: Computer Project
TOPIC:-Simple Calculater: Computer Project
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
2) Monitor : VGA/SVGA
3) CPU : Celeron , 1.7 GHz
4) Printer : Inkjet
6) FDD : 1.44MB
2) Language : C Language
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.
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.
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.
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:-
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.
c) gotoxy() : position the cursor in the text window like 1st in column 2nd is low.
4) stdlib.h : It declears the routin which is normal use declares the convertion
path and find it.
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.