Tampilkan postingan dengan label Tugas. Tampilkan semua postingan
Tampilkan postingan dengan label Tugas. Tampilkan semua postingan

Rabu, 14 Maret 2012

Java Class | Loop Bersarang | Tertawa


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 9niNEFOur4
 */
public class Loop {
        public static void main(String[] args){
            for(int i=1; i<100; i++){
                for(int j=i; j<100; j++){
                   System.out.print("Ha");
                }
                System.out.println(":D");
            }
        }
    }

Kamis, 08 Maret 2012

Java Class | Percabangan


import javax.swing.JOptionPane;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 9niNEFOur4
 */

Java Class | Percabangan Switch | Mencari Luas Bangun


import javax.swing.JOptionPane;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 9niNEFOur4
 */
public class percabanganSwitch {
public static void main(String[] args){
String pilih=JOptionPane.showInputDialog("Menu Utama"+
        "\n 1. Luas Persegi"+
        "\n 2. Luas Persegi Panjang"+
        "\n 3. Luas Jajargengang");
int pilihan = Integer.parseInt(pilih);
switch(pilihan)
{

Senin, 05 Maret 2012

Tugas Mobile Programing : Mencari Luas Bangun

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

//Nama : Surya Kharisma Karnefo
//NoBP : 10101152630292
//Kelas: IF-7
//Mobail Programing


/**
 * @author 9niNEFOur4
 */

Kamis, 01 Maret 2012

Tugas kompleksitas & algoritmik 2


#include <stdio.h>
#include <conio.h>

void shellsort(int a[],int n)
{
int j,i,m,mid;
for(m = n/2;m>0;m/=2)
{
for(j = m;j< n;j++)
{
for(i=j-m;i>=0;i-=m)
{
if(a[i+m]>=a[i])
break;
else
{

Tugas kompleksitas & algoritmik

#include <conio.h>
#include <iostream.h>
#define n 50

class shellsort{
  static int A[n];
public:
  void InsSort(int start, int step);
  void ShellSort();
  void tampil();
};

Rabu, 15 Februari 2012

Coding Faktorial C++

#include <stdio.h>
#include <conio.h>

long int faktorial(int n);
void main(){
    int n;
   long int fak;
   printf("faktorial dari ??"); scanf("%i", &n);
   fak = faktorial(n);
   printf("%i faktorial = %li", n, fak);
   getch();
}