Created
February 25, 2020 15:30
-
-
Save MySoftwareNotes/e174e2678d74f2eac4ca488c6a1dde3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream.h> | |
#include<conio.h> | |
class Temp{ | |
public: | |
Fact() | |
{ | |
int num,fact=1; | |
cout<<"Enter the number to find out Factorial! "; | |
cin>>num; | |
for(int i=num;i>0;i--) | |
fact=fact*i; | |
cout<<"Factorial is "<<fact; | |
} | |
}; | |
void main() | |
{ | |
Temp obj; | |
obj.Fact(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment