This file contains 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
import java.util.Scanner; | |
public class TextRepeater { | |
private String bunga; | |
private int jumlah; | |
private boolean barisbaru; | |
private String tmp; | |
public static void main(String args[]) { | |
welcome(); |
This file contains 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
#!/bin/bash | |
# Useless Scripts, for fun | |
# Gabut? | |
clear | |
echo Haloo, aku Mocci. Terlahir dari bash | |
sleep 1 | |
# Hanya untuk warga baik baik | |
echo Aku dibuat hanya dalam 10 menit |
This file contains 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<stdio.h> | |
#include<time.h> | |
#include<stdlib.h> | |
void generateTicket() { | |
int i; | |
char random[26]="abcdefghijklmnopqrstuvwxyz"; | |
char tiket[8]; | |
for (i = 0; i < 8; ++i) { | |
tiket[i] = random[rand() % (sizeof(random) - 1)]; |
This file contains 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
//don't run | |
#include<stdio.h> | |
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int dat[2][5] = {{1, 2, 3, 4, 5}, | |
{7, 9, 0, 2, 4}}; |
This file contains 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> | |
using namespace std; | |
// fungsi untuk menentukan apakah input bilangan prima atau tidak... fungsi ini mereturn boolean benar atau salah | |
bool isPrima(int number) { | |
int prima = true; | |
// karena bilangan prima adalah bilangan yang habis dibagi 1 dan bilangan itu sendiri maka dibuat perulangan untuk mengecek tiap angka apakah bisa habis membagi bilangan yang diberikan | |
if (number <= 0 || number == 1) { | |
return false; | |
} |
This file contains 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> | |
using namespace std; | |
int main() | |
{ | |
int umur; | |
string jenisKelamin; |
This file contains 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
# Muhammad Khuirul Huda | |
umur = int(input("Masukkan Umur Anda: ")) | |
jenisKelamin = input("Masukkan Jenis Kelamin Anda: ") | |
hasilTes1 = float(input("Hasil Tes 1: ")) | |
hasilTes2 = float(input("Hasil Tes 2: ")) | |
kolomC = 0 | |
kolomE = 0 |
This file contains 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> | |
using namespace std; | |
int main() { | |
int hasil = 1; | |
int angka = 3; | |
int pangkat = 3; | |
for (int i = 1; i <= pangkat; i++) { |
This file contains 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> | |
using namespace std; | |
bool isPrima(int number) { | |
if (number <= 1 ) { | |
return false; | |
} | |
for (int i = 2; i < number; i++) { | |
if ((number % i) == 0) { |
This file contains 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> | |
using namespace std; | |
int power(int number, int pow) { | |
if (pow == 0){ | |
return 1; | |
} | |
return number * power(number, pow-1); | |
} |