Diberdayakan oleh Blogger.
RSS
Powered By Blogger

ALPRO - Flowchar dan Program C+ + Menghitung Perpangkatan


Program C+ + :


#include <iostream>
#include <string>

using namespace std;
int main()
{
   string raptor_prompt_variable_zzyz;
   int hasil;
   int x;
   int y;
   int a;

   raptor_prompt_variable_zzyz ="in";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> x;
   raptor_prompt_variable_zzyz ="in";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> y;
   a =1;
   hasil =1;
   while (!(a>y))
   {
      hasil =hasil*x;
      a =a+1;
   }
   cout << "hasil = "<<hasil<<endl;
   system("pause");
   return 0;
}

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar