Skip to content

Commit

Permalink
rearrange, rename, remove part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Debug Develop committed Mar 23, 2020
1 parent 3a0c9d7 commit 6f4edc9
Show file tree
Hide file tree
Showing 51 changed files with 83 additions and 219 deletions.
29 changes: 0 additions & 29 deletions 5-42.cpp

This file was deleted.

File renamed without changes.
6 changes: 2 additions & 4 deletions Array.cpp → Array_Insert.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#include <iostream>
using namespace std;

int main()
{
int main(){
int x,y;
cout << "This is Array" << endl;
cout << "Masukan sebuah deret angka acak: ";
cin >> x;
int myArray[7];
for(y=0;y<x;y++)
{
for(y=0;y<x;y++){
int z=x%10;
int a=x/10;
x=a;
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions Array2.cpp → Array_StrOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#include <string.h>
using namespace std;

int main()
{
int main(){
cout << "Array Test Case" << endl;
char x[100];
char y[100];
Expand Down
22 changes: 0 additions & 22 deletions AskforInput.cpp

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 3 additions & 6 deletions TwotheBiggest.cpp → FindtheBiggest_2.cpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
#include <iostream>
using namespace std;

int main()
{
int main(){
int z,x;
cout << "First number please" << endl;
cin >> z;
cout << "Second please" << endl;
cin >> x;

if (z>x)
{
if (z>x){
cout << "First Number is the biggest";
}
else
{
else{
cout << "Second Number is the biggest";
}
return 0;
Expand Down
22 changes: 7 additions & 15 deletions Which one is the Biggest.cpp → FindtheBiggest_3.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include <iostream>
using namespace std;

int main()
{
int main(){
int a,b,c,d;
// Which one from these three numbers is the biggest?
cout << "First number= ";
Expand All @@ -12,29 +11,22 @@ int main()
cout << "Third number= ";
cin >> c;

if(a>b)
{
if(a>c)
{
if(a>b){
if(a>c){
cout << "First number is the biggest" << endl;
}
else
{
else{
cout << "Third number is the biggest" << endl;
}
}
else
{
if(b>c)
{
else{
if(b>c){
cout << "Second number is the biggest" << endl;
}
else
{
else{
cout << "Third number is the biggest" << endl;
}
}

system("pause");
return 0;
}
File renamed without changes.
25 changes: 0 additions & 25 deletions HitungLuup.cpp

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Real.cpp → MeanofNums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ int main()
cin >> e;
cout << " \n";

int real=(a+b+c+d+e)/5;
cout << "Rata-rata nilai=" << real;
int mean=(a+b+c+d+e)/5;
cout << "Rata-rata nilai=" << mean;

return 0;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 68 additions & 0 deletions Semaphore_OS/Semaphore.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#include <iostream>
using namespace std;

int in,out,option=0,buffer=0,buffer_size=10;
int main(){
while(option != 3){
cout << "Menu:" << endl << "(1)Produce" << endl << "(2)Consume" << endl << "(3)Exit" << endl;
cout << "Input: ";
cin >> option;
switch(option){
case 1:
if(buffer == buffer_size){
cout << "Buffer is full!\n\n";
}
else{
++buffer;
cout << "Buffer Space: " << buffer_size-buffer << endl << endl;
}
break;
case 2:
if(buffer == 0){
cout << "Buffer is empty!\n\n";
}
else{
--buffer;
cout << "Buffer Space: " << buffer_size-buffer << endl << endl;
}
break;
default:
break;
}
}
}

/*int buffer[10];
int producer,consumer,in=0,out=0,option=0,buffer_size=10;
int main(){
while(option != 3){
cout << "Menu:" << endl << "(1)Produce" << endl << "(2)Consume" << endl << "(3)Exit" << endl;
cout << "Input: ";
cin >> option;
switch(option){
case 1:
if((in+1)%buffer_size==out){
cout << "Buffer is full!\n";
}
else{
cout << "Insert Value: ";
cin >> producer;
buffer[in]=producer;
in=(in+1)%buffer_size;
}
break;
case 2:
if(in == out){
cout << "Buffer is empty!\n";
}
else{
consumer=buffer[out];
cout << "Taken Value: " << consumer << endl;
out=(out+1)%buffer_size;
}
break;
default:
break;
}
}
}*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions Test1.cpp

This file was deleted.

File renamed without changes.
22 changes: 0 additions & 22 deletions Training2.cpp

This file was deleted.

12 changes: 0 additions & 12 deletions Training4.cpp

This file was deleted.

24 changes: 0 additions & 24 deletions WhatDayIsIt3.cpp

This file was deleted.

38 changes: 0 additions & 38 deletions Who'sBiggest.cpp

This file was deleted.

File renamed without changes.

0 comments on commit 6f4edc9

Please sign in to comment.