int main ()
{
cout << "## Program Menghitung Gaji Karyawan ##" << endl;
cout << "======================================" << endl;
cout << endl;
string nama;
char golongan;
int jam_kerja, upah_per_jam, total_upah;
// proses input
cout << "Nama Karyawan: ";
getline (cin,nama) ;
// proses ouput
LEMBAR JAWABAN
UJIAN AKHIR SEMESTER
UNIVERSITAS NEGERI PADANG
T.A 2021/2022
return 0;
}
b. Screenshot Listing Program (screenshot semua layar PC/Laptop Anda seperti contoh di bawah)
LEMBAR JAWABAN
UJIAN AKHIR SEMESTER
UNIVERSITAS NEGERI PADANG
T.A 2021/2022
a. Listing Program
#include <iostream>
int main ()
{
cout << "## Program C++ Biodata Mahasiswa ##" << endl;
cout << "===================================" << endl;
cout << endl;
return 0;
}
a. Listing Program
#include <iostream>
int main ()
{
cout << "## Program C++ Diskon Potongan Harga ##" << endl;
cout << "=======================================" << endl;
cout << endl;
return 0;
}
a. Listing Program
#include <iostream>
int main ()
cout << ": MENENTUKAN INDEKS NILAI MAHASISWA :" << endl;
int nilai ;
if(nilai>=75) {
} else if (nilai>=65){
} else if (nilai>=55){
} else if (nilai>=45){
return 0;
a. Listing Program
#include <iostream>
int counter = 0;
// perulangan while
// increment counter
counter++;
printf("\n\n-----------\n");
printf("Perulangan Selesai!\n");
return 0;
}
LEMBAR JAWABAN
UJIAN AKHIR SEMESTER
UNIVERSITAS NEGERI PADANG
T.A 2021/2022