This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <stdlib.h> | |
using namespace std; | |
//Data nama utama, hanya bisa diubah secara manual oleh user (hanya dibaca saat pengurutan). | |
string nama_mahasiswa[5]; | |
//deklarasi fungsi | |
void bubbleSort(string *nama, int jumlah, bool isAscending); | |
void selectionSort(string *nama, int jumlah, bool isAscending); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <iostream> | |
int main(int argc, char const *argv[]) { | |
int arr[6]={5,2,10,50,70,60}, | |
swap, | |
jumlah = sizeof(arr)/sizeof(arr[0]); | |
std::cout << "Data yang akan diurutkan : " << std::endl; | |
for (int i = 0; i < jumlah; i++) { | |
std::cout << "arr["<< i <<"] = "<< arr[i] << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main(int argc, char const *argv[]) { | |
int arr[6] = {2,0,10,5,70,16}, | |
max, | |
min, | |
jumlah = sizeof(arr)/sizeof(arr[0]); | |
std::cout << "Data yang akan di sorting : " << std::endl; | |
for (int i = 0; i < jumlah; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace relearn | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int B[10], jumlah, ganti, hapus, cari, ketemu = 0; | |
ulangi: //Label untuk goto statement |
NewerOlder