Monday, October 5, 2015

ALPRO (ALGORITMA PEMOGRAMAN) PROGRAM DAN FLOWCHART MENGHITUNG FAKTORIAL

FLOWCHART MENGHITUNG FAKTORIAL


Program C++ :

#include 
#include

using namespace std;
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;
}

Share this

0 Comment to "ALPRO (ALGORITMA PEMOGRAMAN) PROGRAM DAN FLOWCHART MENGHITUNG FAKTORIAL"

Post a Comment