Skip to content

Instantly share code, notes, and snippets.

View ZeroPyrozen's full-sized avatar
🎯
Focusing

Pyrozen ZeroPyrozen

🎯
Focusing
View GitHub Profile
@ZeroPyrozen
ZeroPyrozen / MinHeap.cpp
Created July 9, 2018 13:52
Simple Min Heap Tree Program
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct Node
{
char name[20];
char nim[30];
int score;
}minHeap[101010];
@ZeroPyrozen
ZeroPyrozen / MaxHeap.cpp
Created July 9, 2018 13:57
Simple Max Heap Tree Program
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct Node
{
char name[20];
char nim[30];
int score;
}maxHeap[101010];
@ZeroPyrozen
ZeroPyrozen / Main.java
Created November 26, 2018 12:59
Simple Java Program for Searching Maximum Number between 3 Values.
import java.util.*;
public class Main
{
public static int Max3(int bil1, int bil2, int bil3)
{
int max = bil1;
if(max<bil2)
max = bil2;
if(max<bil3)
@ZeroPyrozen
ZeroPyrozen / Lingkaran.java
Created November 26, 2018 13:36
Simple Java Program to Calculate Circumference and Area of Circle
import java.util.*;
public class Lingkaran
{
private static final float Pi = 3.14159265359f;
private float diameter = 0f;
private void setDiameter(float diameter)
{
this.diameter = diameter;
}
private float getDiameter()
@ZeroPyrozen
ZeroPyrozen / TrainExpress.cpp
Created December 26, 2018 05:13
Simple program for Train Reservation
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct KeretaExpress
{
char expressName[100];
int isACAvailable;
int isColokanAvailable;
int remainingSeat;
int reservedSeat;
#include<stdio.h>
void cetakLogPermintaan(int jumlahPermintaan, int listPermintaan[])
{
printf("\nList Permintaan:\n\n");
for(int i=0; i<jumlahPermintaan; i++)
{
printf("Permintaan %d : %d\n",i,listPermintaan[i]);
}
printf("\n\n");
}
@ZeroPyrozen
ZeroPyrozen / Second to HH:MM:SS
Created July 23, 2019 02:50
Time Converter in C
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
int t,passedTimeInSecond,hour,minute,second;
scanf("%d",&t);
rewind(stdin);
for(int i=0; i<t; i++)
{
@ZeroPyrozen
ZeroPyrozen / TriangleSimple.cs
Created December 3, 2019 15:59
Print Triangle in Console
using System;
public class Program
{
public static void Main()
{
int input = int.Parse(Console.ReadLine());
for(int i=1; i<=input; i++)
{
for(int j=1; j<=i; j++)
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include <algorithm>
//Digunakan untuk memisahkan print yang sesungguhnya dengan print untuk debug
#define debugPrint printf
int getIndexLimit(int arrayData[], int dataCount, int limitSum)
{
//Handle exception
if (dataCount <= 0)
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
#define debugPrint printf
int main()
{
float L, b, P, h;
float E, I, d;
E = 2.07 * pow(10, 11);
debugPrint("E:%.2f\n", E);