Wednesday, 24 December 2014
PROGRAM ABJAD C++
#include <cstdlib>
using namespace std;
class Arr
{
private : int banyak;
public : void masuk ()
{
cout<<"======perogram abjad======"<<endl;
cout<<"Masukkan banyak elemen arry=";
cin>>banyak;
cout<<endl;
string abjad [banyak];
for(int i=0; i <banyak ;i++)
{
cout<<"Masukkan abjad ke"<<i+1 << " = ";
cin>>abjad[i];
}
cout<<endl;
for(int i=0;i< banyak;i++)
{
cout<<"abjad ke" <<i+1<<" adalah " <<abjad[i] << endl;
}
}
};
int main (int argc, char * argv[])
{
Arr arre;
arre.masuk();
cout<<endl;
cout<<endl;
system ("PAUSE");
return EXIT_SUCCESS;
}
//npm : 2013020123
//nama : randa yusuf
//jurusan : MI BIS 3
Labels:
pemograman ku
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment