skip to main | skip to sidebar

Sedikit Ilmu Yang Berguna

  • Entries (RSS)
  • Comments (RSS)
  • Home
  • About Us
  • Archives
  • Contact Us

Saturday, April 9, 2011

c++

Posted by randiadma at 1:25 PM
#pragma argsused
#include <iostream.h>

  class HITUNG {
   private:
    int r, nilai, nilai1;
    double hasil, hasil1;
   public:
     void luas_lingkaran(){
        cout<<"masukkan bilangan r :";
        cin>>r;
        cout<<"phi = 3.14"<<endl;
        hasil = 3.14 * r * r;
        cout<<"hasil luas lingkaran adalah :"<<hasil<<endl;
        cout<<"\n";
        nilai = 4;
        nilai1 = 3;
        hasil1 = (nilai * 3.14 * r * r * r)/nilai1;
        cout<<"hasil volume bola adalah :"<<hasil1<<endl;
     }
     };
int main(){
     int x;
      HITUNG H;
      H.luas_lingkaran();
     cin>>x;

        return 0;
}
0 comments
Email This BlogThis! Share to X Share to Facebook

Sunday, April 3, 2011

part 1

Posted by randiadma at 10:06 AM
 #include <iostream.h>
#include <conio.h>

void main() {
    int A[10] = {1,2,3,4,5,6,7,8,9,10};
    int n = 10;
    cout << "Nilai array asal : ";
    for (int i=0; i<n; i++)
        cout << "Nilai indeks ke-[" << i << "] adalah " << A << endl;
    getch();
}

jeliot


public class array {
   public static void main()
{
        int[] A = {1,2,3,4,5,6,7,8,9,10};
        int n = 10;
        System.out.print("Nilai array asal : ");
        for (int i =0; i<n; i++)
        {
               System.out.print("Nilai indeks ke-[");
               System.out.print(i);
               System.out.print("] adalah ");
               System.out.print(A[1]); //karena menunjuk alamat
               System.out.print("\n");
        }

}
}
0 comments
Email This BlogThis! Share to X Share to Facebook

Friday, April 1, 2011

jeliot 2

Posted by randiadma at 7:02 AM
public class array {
public static void main(String[]args)
{
   int[] A = {1,2,3,4,5,6,7,8,9,10};
   int n = 10;
   System.out.print("Nilai array asal : ");
   for (int i =0; i<n; i++)
   {
      System.out.print("Nilai indeks ke-[");
      System.out.print(i);
      System.out.print("] adalah ");
      System.out.print(A[i]);
      System.out.print("\n");
   }

}
}
0 comments
Email This BlogThis! Share to X Share to Facebook

jeliot

Posted by randiadma at 7:00 AM
class TitikTengah {
    static void main() {
        Output.println("Masukan nilai x1 : ");
        int x1 = Input.readInt();
        Output.println("Masukan nilai y1 : ");
        int x2 = Input.readInt();
        Output.println("Masukan nilai x2 : ");
        int y1 = Input.readInt();
        Output.println("Masukan nilai y2 : ");
        int y2 = Input.readInt();
        int A,B;
       
        A=(x1+x2)/2;
        B=(y1+y2)/2;

        Output.println("Tampilkan A :" + A);
        Output.println("Tampilkan B :" + B);
    }
}
0 comments
Email This BlogThis! Share to X Share to Facebook
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Sponsored

  • banners
  • banners
  • banners
  • banners

Blog Archive

  • ▼  2012 (61)
    • ▼  June (2)
      • raptor menggeser elemen array ke kanan
      • REFLEKSI MINGGU KESEBELAS ALPRO
    • ►  May (9)
    • ►  April (19)
    • ►  March (27)
    • ►  February (1)
    • ►  January (3)
  • ►  2011 (44)
    • ►  December (2)
    • ►  November (11)
    • ►  October (1)
    • ►  September (5)
    • ►  May (1)
    • ►  April (16)
    • ►  March (8)

Followers

Clock Widgets

About Me

My photo
randiadma
Saya Mahasiswa UAD, Jurusan Teknik Informatika,
View my complete profile

My Fuckkn Facebook

Randy Mix Emax

Buat Lencana Anda

Followers

Powered by Blogger.

Blog Archive

  • ▼  2012 (61)
    • ▼  June (2)
      • raptor menggeser elemen array ke kanan
      • REFLEKSI MINGGU KESEBELAS ALPRO
    • ►  May (9)
    • ►  April (19)
    • ►  March (27)
    • ►  February (1)
    • ►  January (3)
  • ►  2011 (44)
    • ►  December (2)
    • ►  November (11)
    • ►  October (1)
    • ►  September (5)
    • ►  May (1)
    • ►  April (16)
    • ►  March (8)
 

© 2010 My Web Blog
designed by DT Website Templates | Bloggerized by Agus Ramadhani | Zoomtemplate.com