Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group 6 // IF-43-05 #288

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ASD_Task_1.depend
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@

1516168119 c:\users\andityaarifianto\documents\github\asd_task_1\asd_task_1.h

1579948774 source:d:\std\github\asd_task_1\main.cpp
<iostream>

1579929580 source:d:\informatika\semester 2\struktur data\asd_task_1\main.cpp
<iostream>

8 changes: 6 additions & 2 deletions ASD_Task_1.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="main.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
<Cursor>
<Cursor1 position="461" topLine="0" />
<Cursor1 position="2404" topLine="3" />
</Cursor>
<Folding>
<Collapse line="26" />
<Collapse line="47" />
</Folding>
</File>
</CodeBlocks_layout_file>
Binary file modified bin/Debug/ASD_Task_1.exe
Binary file not shown.
33 changes: 24 additions & 9 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ using namespace std;


/** WRITE DOWN YOUR INFORMATION HERE */
string name = ""; // put your name here
string ID = ""; // put your student id here
int group_id = 0; // your Group Number here (1-8)
string name = "I Wayan Adi Wahyudi,Balqis Sayyidahtul Atikah,Mayang Sari,Akmal Muhamad Faza."; // put your name here
string ID = "1301194084,1301193480,1301194227,1301190436"; // put your student id here
int group_id = 6; // your Group Number here (1-8)


/** FUNCTIONS LIST, DO NOT MODIFY THESE */
Expand Down Expand Up @@ -70,11 +70,23 @@ void insert_last_unique(int arr[], int &n, int x) {
*/

// YOUR CODES HERE

//--------------
bool sama=false;
int i;
for (i=0; i<n; i++){
if (arr[i]==x){
sama=true;
}
}
if (sama==false){
arr[n]=x;
n++;
}
}
//-----------------------


//-----------------------
}


void insert_first(int arr[], int &n, int x) {
Expand Down Expand Up @@ -182,8 +194,9 @@ void swap_data(int arr[], int n) {

// YOUR CODES HERE
//-----------------------


for (int i = 0 ; i < n / 2 ; i++) {
swap(arr[i],arr[n-i-1]);
}
//-----------------------
}

Expand Down Expand Up @@ -214,8 +227,10 @@ void view_data_2(int arr[], int n) {

// YOUR CODES HERE
//-----------------------


for (int i=n-1; i>=0 ;i--) {
cout<<arr[i]<<" ";
}
cout<<endl;
//-----------------------
}

Expand Down
Binary file modified obj/Debug/main.o
Binary file not shown.