Nama NIM Grup Aslab
: Fitria Khairani : 180803021 : P-1 : 1. Zainuddin Siregar (160803010) 2. Mutia Sari (150803023)
A. Source Code #include using namespace std; #define jumlah 10 int main() { int i; char huruf[jumlah]={'k','h','a','i','r','a','n','i'}, X[jumlah]={}, input; for(i=0;i<10;i++) { X[i]=' '; } ulangi: cout<<endl<<"Masukkan huruf: ";cin>>input; for(i=0; i<10; i++) { if(input==huruf[i])X[i]=huruf[i]; cout<<X[i]<<" "; } goto ulangi; }
B. Output