Here is a C Program for Customer and Day Based Shop Management Program
#include <stdio.h>
Tsathi(Tech sathi)
Here is a C Program for Customer and Day Based Shop Management Program
#include <stdio.h>
#include<iostream>
#include<conio.h>
using namespace std;
class Box
{
private:
float l,b,h;
public:
Box(float le, float br, float he)
{
l=le;
b=br;
h=he;
}
Box(Box &b2)
{
l=b2.l;
b=b2.b;
h=b2.h;
}
void DisplayMembers()
{
cout<<"\nLength:"<<l;
cout<<"\nBreadth:"<<b;
cout<<"\nHeight:"<<h;
}
float getVolume()
{
return l*b*h;
}
};
int main()
{
float vol;
Box b1(10.5,5.5,6.5);
Box b2(b1);
cout<<"___________For the First Object b1_______________:";
b1.DisplayMembers();
vol=b1.getVolume();
cout<<"\nThe Volume of Box is:"<<vol;
cout<<"\n___________For the second Object b2_______________:";
b2.DisplayMembers();
vol=b2.getVolume();
cout<<"\nThe Volume of Box is:"<<vol;
getch();
return 0;
};
Output of copy constructor
OUTPUT
Find the volume of Box using construcor ..
#include<iostream>
#include<conio.h>
using namespace std;
class Box
{
private:
float l,b,h;
public:
Box(float le, float br, float he)
{
l=le;
b=br;
h=he;
}
float getvolume()
{
return(l*b*h);
}
};
int main(){
float vol;
Box ob(10,3.5,5.5);
vol=ob.getvolume();
cout<<"The volume of Box is:"<<vol;
return 0;
getch();
};
This code is written by sagar dhakal.
for the educational purpose.....
#include <iostream>
using namespace std;
class box
{
private:
float l,b,area;
public:
void readdata()
{
cout<<"\t\t\t*****************************";
cout<<"\n\t\t\t\tWELCOME BY THE SAGAR DHAKAL\n\t\t\t_____________________________";
cout<<"\n\n\t\tTo find Area of Square and rectangle\n\n\t1.Enter the value of length\n---->";
cin>>l;
cout<<"\n\t2.Enter the value of breadth\n---->";
cin>>b;
}
void displayarea()
{
area=l*b;
cout<<"The area of the following object is:\n\t\t\t\t"<<area;
}
};
int main()
{
box b1;
b1.readdata();
b1.displayarea();
cout << "\n\t\tThank you!" << endl;
return 0;
}
Here is a C Program for Customer and Day Based Shop Management Program #include <stdio.h> int main () { char name [ 20 ]; ...