View pangkat.cpp
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++) { |
View tesKebugaran.py
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 |
View tesKebugaran.cpp
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; |
View isPrime.cpp
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) { |
View isPrime.cpp
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; | |
} |
View multidimension-array.cpp
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}}; |
View wahana.c
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)]; |
View gabut.sh
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 |
View TextRepeater.java
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(); |