Theoretical Paper
- Computer Organization
- Data Structure
- Digital Electronics
- Object Oriented Programming
- Discrete Mathematics
- Graph Theory
- Operating Systems
- Software Engineering
- Computer Graphics
- Database Management System
- Operation Research
- Computer Networking
- Image Processing
- Internet Technologies
- Micro Processor
- E-Commerce & ERP
- Numerical Methods Tutorial
Practical Paper
- C Programming
- C
- Data Structure Using C, C ++
- Programming in R
- Programming with Python
- Machine Learning
- Swift
- Firebase
- Android
- iOS Development
- Django
- PHP
- Arduino
- Internet of Technology
- IOT Projects
- Dart Programming
- Flutter
- Flutter Tutorials
- Kotlin Tutorial
- Laravel Tutorial
- VueJS Tutorial
- Go Lang
- Rust
- Apex
Industrial Training
Calculator
# include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class calculator{
int argument;
int value;
public:
calculator(){//constructor.
cout<<"Enter the values of 'arg' and 'value'.\n";
cin>>argument>>value;
}
void show(void){//displays the private members.
cout<<"argument="<<argument<<endl;
cout<<"value="<<value<<endl;
cout<<"Press any key to continue...\n";
getch();
}
const int compute(int i);
};
//----------------------------------------------------------------
int const calculator::compute(int i){
if (argument==0)
argument=i;
return value;
}
void main(){
int x;
calculator c1;
c1.show();
x=c1.compute(0);
cout<<"x="<<x<<endl;
c1.show();
x=c1.compute(60);
cout<<"x="<<x<<endl;
c1.show();
calculator c2;
x=c2.compute(70);
c2.show();
system("type 5calcu.cpp");
return;
}