An Overview

All the necessary study material for b-tech students.

What we have to offer you.

Codes,Syllabus,Study material,Lab manuals,Assignments and many more . . .

Surfing becomes easy.

You can have any material from our website and post your valuable comments for further improvement.

Get the latest techno news

Get yourself updated with this fast changing dynamic world and all the changes in b-tech pattern.

All the best resources for you.

We have done our level best to provide you with the best of the degree and thus this site is devoted to b-tech exclusively.

Showing posts with label multiplication program. Show all posts
Showing posts with label multiplication program. Show all posts

14 November 2011

A simple class program in C++ to multiply using classes.

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
class mul
{
private:
int no1,no2;
public:
void getdata()
{
cout<<"\n Enter the 1st number :";
cin>>no1;
cout<<"\n Enter the 2nd number :";
cin>>no2;
}
void putdata()
{
cout<<"\n \n The 1st number is "<<no1;
cout<<"\n \n The 2nd number is "<<no2;
}
int calmul()
{
int mul1;
mul1=no1*no2;
return(mul1);
}
};
void main()
{
int num;
clrscr();
mul m;
m.getdata();
m.putdata();
num=m.calmul();
cout<<"\n \n The multiplication of two numbers is "<<num;
getch();
}