Assalamualaikum wr.wb
hy guys, what's you guys. how are you today. i hope you always be better than yesterday.
maaf nih guys lagi sibuk2nya nih memuat laporan atau biasa disebut tugas
jadi nih blog jadinya kudet yah hehehe ( kurang upddate) tapi tenang karena saya selalu aktif kok heheeh.
ok i dont wanna waste your time, you"ve to see my program let's check this out :
PERMASALAHAN :
menghitung masalah perpangkatan
c++:
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a,b,c;
int pangkat=1;
cout<<"menghitung perpangkatan :"<<endl;
cout<<"masukkan bilangan= ";cin>>a;
cout<<"masukkan pangkat= ";cin>>b;
for(int a=1;a<=b;a++){
pangkat*=a;
cout<<a<<"pangkat="<<b<<"="<<pangkat<<endl;
}
return 0;
}
ASSALAMUALAIKUM WR.WB
0 komentar:
Posting Komentar