#include<iostream.h>
#include<conio.h>
class factor
{
private:
int fact, i, n;
public:
int operate();
void display();
factor();
};
factor :: factor()
{
clrscr();
cout<<"Enter the number whose factorial is required : ";
cin>>n;
fact = 1;
}
int factor :: operate()
{
for (i=1; i<=n; i++)
{
fact=fact*i;
}
return(fact);
}
void factor :: display()
{
cout<<endl<<"The factorial of entered no. is:";
cout<<fact;
}
int main ()
{
class factor obj;
obj.operate();
obj.display();
getch();
return 0;
}
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement 
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 

To enter any number and find its factorial and display it using constructor.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 Enter the two operands using constructer and perform arithmetic operations (+, -, *, /) on them and display the result.
2 To enter any number and find its factorial and display it using constructor
3 To demonstrate the use of parameterized constructor.
4 To demonstrate the use of default constructor for the object of class
5 Program to illustrate the copy constructor for the object of class.
6 To find largest of three members using constructors and then use destructors at the end of program
7 To find biggest of the use friend function using inline function
8 To demonstrate the use of friend function using inline function
9 To find largest of two numbers using common friend function
10 To demonstrate classes & pointers.
11 To simulate saving account processing in a bank using constructors also use destructors at the end of the program
12 To generate Fibonacci series using copy constructor
13 Write a program to find the sum of two entered complex numbers from two different classes and display the sum using a common friend to two classes.
14 Write a C + + program the activity for 20 salesman each deals in separate product and is assigned an annual target at the end of the month his monthly sales is adds in to the sale till date at the end of the year his commissions is calculated as follows if sales made is more than target then the commission is 25% of the extra sales made + 10 % of the target if sales made is equal to the target then the commission is 10% of the target otherwise commission is zero.

 

     
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement