Computer Science: Project File
Computer Science: Project File
Computer Science: Project File
TABLE OF CONTENTS
Certificate Acknowledgement Header files and their purpose Coding Limitations Requirements Bibliography
Acknowledgement
I thank my Computer Science teacher _____ for guidance and support. I also thank my Principal ______. Finally I would like to thank CBSE for giving me this opportunity to undertake this project.
Certificate
This is to certify that __________ of class twelve, of this Vidyalaya , has successfully completed his project in computer practicals for the AISSCE as prescribed by CBSE in the year ___.
__________________
__________________
CODING
#include<iostream.h> #include<conio.h> #include<math.h> void main() { long double x,y; char ch,ar; do { clrscr(); cout<<"**************WELCOMETOC++'SCALCULATOR*************"; cout<<'\n'<<"This is a Calculator containing the following functions"; cout<<'\n'<<"1.Addition"<<'\n'<<"2.Subtraction"<<'\n'; cout<<"3.Multiplication"<<'\n'<<"4.Division"<<'\n'<<"5.Percentage"; cout<<'\n'<<"6.Power "<<'\n'; cout<<"Type"<<'\n'<<"[+] for Addition"<<'\n'; cout<<"[-] for Subtraction"<<'\n'<<"[*] for Multiplication"<<'\n'; cout<<"[/] for Division"<<'\n'<<"[%] for Percentage"<<'\n'; cout<<"[^] for Power "<<'\n'; cout<<"Enter Function To use = "; cin>>ch; cout<<(char)7; cout<<endl; //For Addition if(ch=='+')
{ clrscr(); cout<<"You are using Addition"; cout<<'\n'<<"Enter First Number= "; cin>>x; cout<<"Enter Second Number= "; cin>>y; cout<<"Your answer is "; cout<<x+y; cout<<(char)7; } // For Subtraction if(ch=='-') { clrscr(); cout<<"You are using Subtraction"; cout<<'\n'<<"Enter First Number= "; cin>>x; cout<<"Enter Second Number= "; cin>>y; cout<<"Your answer is "; cout<<x-y; cout<<(char)7; } // For Multiplication if(ch=='*') { clrscr(); cout<<"You are using Multiplication";
cout<<'\n'<<"Enter First Number= "; cin>>x; cout<<"Enter Second Number= "; cin>>y; cout<<"Your answer is "; cout<<x*y; cout<<(char)7; } // For Division if(ch=='/') { clrscr(); cout<<"You are using Division"; cout<<'\n'<<"Enter First Number= "; cin>>x; cout<<"Enter Second Number= "; cin>>y; cout<<"Your answer is "; cout<<x/y; cout<<(char)7; } // For Percentage if(ch=='%') { clrscr(); cout<<"You are using Percentage"; cout<<'\n'<<"Enter Number= "; cin>>x; cout<<"Enter Percentage= ";
cin>>y; cout<<"Your answer is "; cout<<y/100*x; cout<<(char)7; } //For Power if(ch=='^') { clrscr(); cout<<"You are using Power"; cout<<'\n'<<"Enter Number= "; cin>>x; cout<<"Enter Power= "; cin>>y; cout<<"Your answer is "; cout<<pow(x,y); cout<<(char)7; } cout<<endl; cout<<"Do you want to continue..Y/N?"; cin>>ar;
} while(ar=='Y'|| ar=='y'); if(ar=='N' || ar=='n') { cout<<"****Thankyou for using this Calculator.Good Bye.****; cout<<'\n'<<"Press any key to exit......."; }
getch(); cout<<(char)7; }