1. Assignment no 5
1) WAP to find the factorial value of any no. entered through the
keyboard.
flowchart:
2. Program:
//c++ program to find the factorial value
#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
int a,f=1;
cout<<”Enter any number:”<<endl;
cin>>a;
for( int i=1; i<=a; i++)
{
f=f*i;
}
cout<<”Factorial of the entered number=”<<f;
getch();
}
4. Program:
//c++ program to reverse the entered no
#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
int r,n,a=0;
cout<<”Enter any three digit number:”<<endl;
cin>>n;
cout<<”Reverse of the entered number is:”<<endl;
while(n!=0)
{
r=n%10;