Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Achmad Hidayat achmadweb

🎯
Focusing
View GitHub Profile
@achmadweb
achmadweb / proc.c
Created Sep 17, 2020
Contoh program utama dan prosedur untuk menukar 2 buah nilai
View proc.c
#include<stdio.h>
void plus1 (int* a) {
int temp;
*a=*a+1;
}
void plusd (int* a, int d) {
@achmadweb
achmadweb / fadd.c
Created Sep 17, 2020
Fungsi yang menjumlahkan a+b
View fadd.c
#include <stdio.h>
int add (int a, int b) {
return(a+b);
}
int inkremen (int a) {
return (a+1);
}
int main() {
View maxsort.c
#include<stdio.h>
int main()
{
int i;
int Tab[10]= {1, 50, 6, 200, 3, 100, 30, 8, 99, 100 };
int max;
int k, temp;
@achmadweb
achmadweb / max.c
Created Sep 17, 2020
Maximum-Minimum
View max.c
#include<stdio.h>
int main()
{
int i;
int Tab[10]={ 1, 50, 6, 200, 3, 300, 100, 30, 8, 99 };
int max;
max = Tab[0];
for (i=1;i<10; i++){
@achmadweb
achmadweb / tabel1.c
Created Sep 17, 2020
Baca Tulis Isi Tabel
View tabel1.c
#include<stdio.h>
int main()
{
int Tab [5];
int i;
for (i=0; i<5; i++);{
scanf ("%d", &Tab[i]);
@achmadweb
achmadweb / IF_ELSE_IF.c
Created Sep 16, 2020
Instruksi If else if
View IF_ELSE_IF.c
#include<stdio.h>
int main()
{
int a;
printf ("Contoh IF tiga kasus \n");
printf ("Ketikkan suatu nilai integer : ");
scanf ("%d", &a);
@achmadweb
achmadweb / Boolean
Created Sep 16, 2020
Operator Boolean
View Boolean
#include<stdio.h>
int main()
{
int TRUE = 1;
int FALSE = 0;
printf ("Ini nilai true and true : %d \n", TRUE && TRUE );
printf ("Ini nilai true or false : %d \n", TRUE || FALSE );
printf ("Ini nilai false and true : %d \n", FALSE && TRUE );
@achmadweb
achmadweb / aritmetika
Created Sep 16, 2020
OPERASI ARITMETIKA
View aritmetika
#include<stdio.h>
int main()
{
int x=5;
int y=8;
printf ("Ini nilai x + y :%d \n", x+y);
printf ("Ini nilai x - y : %d \n", x-y);
printf ("Ini nilai x * y : %d \n", x*y);
You can’t perform that action at this time.