## Factorial Using Function Example

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  …

## Program In C++ Factorial Using Recursion Example

#include<iostream> #include<conio.h> using namespace std; //Function long factorial(int); int main() { // Variable Declaration …

## Fibonacci series Example Program In C++

#include<iostream> #include<conio.h> using namespace std; int main() { // Variable Declaration int counter, n; …

## Find Prime Number by another method

Example Program In C++ #include<iostream> #include<conio.h> #include<math.h> // Math.h For sqrt function using namespace …

## Find Prime Number Example Program In C++

#include<iostream> #include<conio.h> #include<math.h> // Math.h For sqrt function using namespace std; int main() { …

## Simple Example Program For Namespace In C++

#include <iostream> using namespace std; //Namespace namespacefirst namespace namespacefirst { int value = 5; } …

## Simple Class Example Program For Find Prime Number In C++

```#include<iostream>
#include<conio.h>
using namespace std;
// Class Declaration
class prime
{
//Member Varibale Declaration
int a,k,i;
public:
prime(int x)
{
a=x;
}
// Object Creation For Class
void calculate()
{
k=1;
{
for(i=2;i<=a/2;i++)
if(a%i==0)
{
k=0;
break;}
else
{
k=1;
}
}
}
void show()
{
if(k==1)
cout<<”\n”<<a<<” is Prime Number.”;
else
cout<<”\n”<<a<<” is Not Prime Numbers.”;
}
};
//Main Function
int main()
{
int a;
cout<<“Enter the Number:”;
cin>>a;
// Object Creation For Class
prime obj(a);
// Call Member Functions
obj.calculate();
obj.show();
getch();
return 0;
}```

## Simple Class Example Program In C++

#include <iostream> #include<conio.h> using namespace std; // Class Declaration class person { //Access – …

## Simple Example Program For Copy Constructor In C++

#include<iostream> #include<conio.h> using namespace std; class Example { // Variable Declaration int a,b; public: //Constructor …