#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
bool cekPrima(int num) {
if (num <= 1) return false;
for (int i = 2; i <= sqrt(num); i++) {
if (num % i == 0) return false;
}
return true;
}
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
bool cekPrima(int num) {
if (num <= 1) return false;
for (int i = 2; i <= sqrt(num); i++) {
if (num % i == 0) return false;
}
return true;
}
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
struct Barang {
string nama;
double harga;
int jumlah;
};
struct Pelanggan {
string NIK;
string nama;
string alamat;
int umur;
long pembelian;
};
int main() {
string password = "password";
string inputPassword;
bool passwordBenar = false;
struct karyawan {
string nama;
char golongan;
int jumlah_anak;
int gapok;
int JA;
int Ttl_Gaji;
int Ttl_jmlank;
};
int main() {
int n;
cout << "Masukan Jumlah Karyawan : ";
cin >> n;
#include <conio.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
using namespace std;
int main( )
{
struct program{
int hb;
#include <conio.h>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <string>
#include<windows.h>
using namespace std;
int main()
{
#include<iostream>
using namespace std;
int main()
{
int temp;
//int x[]={10,5,2,7,8,3};
int x[]={17,23,12,00,49};
int j = sizeof(x)/sizeof(*x);
cout<<" X : ";
for(int i=0; i<j; i++)
{
cout<<x[i]<<" ";
}
#include<iostream>
using namespace std;
int main()
{
int x[]={3,4,6,5,2};
int j = sizeof(x)/sizeof(*x);
int temp,pos,y;
cout<<" y : ";
for(int i=0; i<j;i++){
cout<<x[i]<<" ";
}
cout<<endl;
//pengurutan selection
for(int a=0; a<j;a++){
temp=x[a];
pos=a;
for(int b=a;b<j;b++){
if(x[b]<temp){
temp=x[b];
pos = b;
}