Program C++ :
#include
#include
#include
using namespace std;
int main()
{
int n, i;
unsigned long hasil;
int main()
{
int n, i;
unsigned long hasil;
cout<<"faktorial ";
cin >> n;
hasil =1;
i =1;
while (!(i>n))
{
hasil =hasil*i;
i =i+1;
}
cout << n<<" ! = "<<< endl;
system(“PAUSE”);
return 0;
}
cin >> n;
hasil =1;
i =1;
while (!(i>n))
{
hasil =hasil*i;
i =i+1;
}
cout << n<<" ! = "<
system(“PAUSE”);
return 0;
}
0 Comment to "ALPRO (ALGORITMA PEMOGRAMAN) PROGRAM DAN FLOWCHART MENGHITUNG FAKTORIAL"
Post a Comment