Sasori of Akatsuki Sprite

Sabtu, 30 Maret 2013

Kasus 4.3 menghitung rata-rata dari n bilangan bulat

klik disini

Kasus 4.2 Cetak bilangan ganjil

aaa

Kasus 4.1 Cetak angka 1-4

klik disini

Kasus 4.8 Hitunglah a x b dengan metode penjumlahan

Program c++:

#include <iostream>
#include <string>

using namespace std;
int main()
{
   string raptor_prompt_variable_zzyz;
   int i;
   int jumlah;
   int x;
   int y;

   raptor_prompt_variable_zzyz ="masukkan nilai:";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> x;
   cout << "Nilai :"<<x << endl;   raptor_prompt_variable_zzyz =":Masukkan Looping:";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> y;
   cout << "looping:"<<y << endl;   jumlah =x;
   i =1;
   while (!(i==y))
   {
      jumlah =jumlah+x;
      i =i+1;
   }
   cout << "hasil:"<<jumlah << endl;
   
   system("pause");
   return EXIT_SUCCESS;
}



Raptornya:


Kasus 4.7 nilai dari x^y dengan x bilangan real dan y bilangan bulat

Program c++

 #include <cstdlib>
#include <iostream>

using namespace std;
int pangkat (int a, int n){
    int k,hasil;
    hasil = 1;
    for (k = 1;k <= n;k++){
        hasil = hasil*a;
        }
    return hasil;
}

int main(int argc, char *argv[])
{                  
     int a,n;
    cout<<"Masukkan angka :";cin>>a;
    cout<<"Masukkan pangkat :";cin>>n;
    cout<<"Hasil perpangkatan ="<<pangkat(a,n);
    cout<<"\n";

    system("PAUSE");
    return EXIT_SUCCESS;
}

Raptornya:

Kasus 4.4 rata-rata dari integer positif (banyak data ditentukan dari data yang dimasukkan)



Program c++

#include <iostream>
#include <string>

using namespace std;
int main()
{
   string raptor_prompt_variable_zzyz;
   int n;
   int jumlah;
   int x;
   float rata;
   int data;

   jumlah =0;
   raptor_prompt_variable_zzyz ="masukkan jumlah data";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> x;
   n =1;
   while (!(n>x))
   {
      raptor_prompt_variable_zzyz ="masukkan nilai";
      cout << raptor_prompt_variable_zzyz << endl;
      cin >> data;
      if (data>0)
      {
         jumlah =jumlah+data;
         cout << data << endl;         n =n+1;
      }
      else
      {
      }
   }
   rata =jumlah/(n-1);
   cout << "rata ratanya "<<rata << endl;

   system ("pause");
   return EXIT_SUCCESS;
}




 Raptornya:


Senin, 25 Maret 2013

Kasus 3.4 Konversi nilai

Program c++:

#include <cstdlib>
#include <iostream>

using namespace std;

class NILAI{
      public:
             
             void konversikan();
             
      
private:
        float nilai;
        
};

void NILAI::konversikan(){
     cout<<"\n\n \t\t KONVERSI NILAI";
    cout<<"\n\nmasukkan nilai = ";cin>>nilai;
    if((nilai>0)&&(nilai<=20))
    cout<<"Nilai E"<<endl<<endl;
    else if((nilai>20)&&(nilai<=40))
    cout<<"Nilai D"<<endl<<endl;
    else if((nilai>40)&&(nilai<=60))
    cout<<"Nilai C"<<endl<<endl;
    else if((nilai>60)&&(nilai<=80))
    cout<<"Nilai B"<<endl<<endl;
    else if((nilai>80)&&(nilai<=100))
    cout<<"Nilai A"<<endl<<endl;
    else 
    cout<<"salah memasukkan angka (angka>100)"<<endl<<endl;
}



int main(int argc, char *argv[])
{
    hehehe:
    NILAI ku;
    int q;
    cout<<"======================PILIHAN====================="<<endl;
    cout<<"1. Konversi nilai"<<endl;
    cout<<"2. Keluar/Exit"<<endl;
    cout<<"masukkan pilihan anda = ";cin>>q;
    
    switch(q){
              case 1: ku.konversikan();goto hehehe;
              break;
              case 2: return EXIT_SUCCESS;
              break;
              
              default: cout<<"\n\n \t\t PILIHAN SALAH"<<endl<<endl;goto hehehe;
              }
system("pause");
return EXIT_SUCCESS;

}


Flowchart:




Sabtu, 23 Maret 2013

Kasus 3.3 akar-akar persamaan kuadrat


Program c++

#include <iostream>
#include <string>
#include <math.h>
using namespace std;
int main()
{
   string raptor_prompt_variable_zzyz;
   int a,b,c;
   float disk,x1,x2;

   raptor_prompt_variable_zzyz ="masukan nilai a";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> a;
   raptor_prompt_variable_zzyz ="masukan nilai b";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> b;
   raptor_prompt_variable_zzyz ="msukan nilai c";
   cout << raptor_prompt_variable_zzyz << endl;
   cin >> c;
   disk =(b*b)-(4*a*c);
   if (disk>0)
   {
      x1 =-b+sqrt(disk)/2*a;
      x2 =(-b)-sqrt(disk)/2*a;
      cout << x1 << endl;      cout << x2 << endl;   }
   else
   {
      if (disk==0)
      {
         x1 =-b/2*a;
         x2 =x1;
         cout << x1 << endl;         cout << x2 << endl;      }
      else
      {
         cout << "akar imajiner" << endl;      }
   }

system("pause");
   return EXIT_SUCCESS;
}



Flowchart:

Kasus 3.2 bilangan terbesar antara 3 bilangan bulat

Deklarasi:

  • x,y,z : integer (input)
  • x,y,z : intteger (output)
Deskripsi: 
  • read (x,y,z)
  • if (x>y) then write "bilangan terbesar adalah= "<--+x
  • else if (x>z) then write "bilangan terbesar adalah= "<--+x
  • else if (y>x) then write "bilangan terbesar adalah= "<--+y
  • else if (y>z) then write "bilangan terbesar adalah= "<--+z
  • else then write "bilangan terbesar adalah= "<--y

Program c++:

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
   int a,b,c;
   cout<<"masukkan nilai a: ";cin>>a;
   cout<<"masukkan nilai b: ";cin>>b;
   cout<<"masukkan nilai c: ";cin>>c;
   if (a>b)
   {
   cout<<"bilangan terbesar adalah :"<<a<<endl;}
   else
   {
   if (a>c)
   {cout << "bilangan terbesar adalah :"<<a<<endl;}
   else
   {
   if (b>c)
   {
   cout << "bilangan terbesar adalah :"<<b<<endl;}
   else     
   {
   if (b>a)
   {
   cout << "bilangan terbesar adalah :"<<c<<endl;}
   else
   {
   cout << "bilangan terbesar adalah: "<<b<<endl;}
   }
   }
   } 
    
    system("PAUSE");
    return EXIT_SUCCESS;
}



Flowchart: 


Algoritma dan program untuk memisahkan bilangan integer yang kurang dari 1000 menjadi komponen- komponennya

Deklarasi:

  • nilai : {integer} input
  • ratusan, puluhan satuan : {integer } output
Deskripsi: 
  • read (nilai)
  • ratusan <-- (nilai/100)
  • a<-- nilai %100
  • puluhan <-- nilai/10
  • b<-- a%10
  • satuan <-- b/1
  • write (ratusan, puluhan, satuan)
Flowchart:

Algoritma menghitung determinan matrik 2x2


Deklarasi:

  • A,B,C,D : integer (input)
  • hasil : integer (output)
Deskripsi:
  • read(A,B,C,D)
  • hasil <--((A*D)-(B*C))
  • write hasil



Flowchart



Refleksi Alpro minggu 2


Pertemuan 2 Tgl 16-03-2013

Memasuki minggu ke-2 perkuliahan Alpro sudah memasuki pembelajaran mengenai SEKUEN. Pada pertemuan ini kami duduk berdasarkan kelompok yang telah kami tentukan sendiri, dan dosen memberikan tugas latihan kepada kami dimana setiap anggota kelompok membahas masing-masing 1 soal. Apabila ada kelompok yang telah selesai mengerjakan, kelompok yang belum selesai mengerjakan di himbau dosen untuk mendatangi kelompok yang sudah selesai.
Pada pertemuan ke-2 ini kami disuruh memposting hasil dari diskusi tadi. Kendala yang saya hadapi pada saat itu, saya tidak mengerti betul apa yang diajarkan dosen, dan saya bingung dengan tugas apa saja yang di suruh sama dosen.
Semoga saya bisa paham dengan materi-materi selanjutnya
sekian dan terima kasih ^^

Jumat, 22 Maret 2013

Algoritma dan program untuk mencari titik tengah sebuah garis

Buatlah algoritma dan program untuk mencari titik tengah sebuah garis yang ujung titiknya adalah A(x1,y1) dan B(x2,y2).

Deklarasi :
  • x1,y1,x2,y2 : integer (input)
  • c : integer (output)
Deskripsi:
  • read(x1,y1,x2,y2)
  • a <--(x1-x2)^2
  • b <--(y1-y2)^2
  • write c (a+b)



Flowchart




RINGKASAN PERTEMUAN 1


RINGKASAN PERTEMUAN 1

 Section 3 Career Opportunities

The Bureau of Labor Statistics is the principal fact-finding agency for the U.S. Federal Government in the field of labor economics and statistics. This agency publishes The Occupational Outlook Handbook , which is a nationally recognized source of career information, designed to provide valuable assistance to individuals making decisions about their future work lives. The Handbook is revised every two years. In 2011, an occupation search using the term computer science resulted in over 9000 search results with more than 40 career matches. This means that computer science was listed in the job description, or in the type of degree desired, or in the recommended courses for that job. Examples of the matched include Computer Software engineers, Computer Systems analysts, Mathematicians, Computer  Programmers, Web Designers and Developers, Secondary and Postsecondary Teachers, Statisticians, Medical Records and Health Information Technicians, Atmospheric Scientists, Market and Survey Researcher, Economists, Radiation Therapists, Urban and Regional Planners, Surveyors and Mapping Technicians, Conservation Scientists and Foresters, Travel Agents, Private Detectives and Investigators, Geoscientists, Psychologists, and Interpreters and Translators.

The Demand in the United States and in the World According to the BLS Occupational Outlook Handbook, computer software engineer and computer scientist and database administrator are some of the occupations projected to grow the fastest and to add the most new jobs over the 2008–2018 decade. Strong employment growth combined with a limited supply of qualified workers will
result in excellent employment prospects. Those with practical experience and at least a bachelor’s degree in computer engineering or computer science should have the best opportunities.
Employers will continue to seek computer professionals with strong programming, systems analysis, interpersonal, and business skills. The Federal Government is the nation’s largest employer, with more than 1.8 million civilian employees. Computer specialists—primarily computer software engineers, computer systems analysts, and network administrators—are employed throughout the federal government. Of all the “professional and related occupations” listed as employed by the federal government, only the occupations of computer specialists and conservation scientists were projected to have an actual increase in job numbers for the 2008–2018 decade. The growing need for computer professionals is increased by the looming retirement of a generation of baby boomers, and all of this is occurring as the government projects that the computer science/IT workforce will grow nearly 25 percent between 2008 and 2018 more than twice as fast as the overall workforce.
Today’s student should not be worried about any impact outsourcing computer jobs to other countries will have on their ability to find a job. The fact is many companies have tried outsourcing entire projects and found that it does not work well.

========================================================================





RINGKASAN PERTEMUAN 2

CHAPTER 2

2.1 Exchanging the Values of Two Variables





========================================================================


Kamis, 14 Maret 2013

Refleksi ALPRO minggu 1

Pada tanggal 09-03-2013 saya memasuki perkuliahan ALPRO untuk pertama kalinya. Waktu itu saya datang jam 06.50, dan begitu saya sudah masuk ruangan kelas, dosen ALPRO sudah datang terlebih dahulu. Itu artinya saya terlambat masuk kelas, dan merasa malu.
Awal pertemuan pertama kami tidak mempelajari materi perkuliahan, melainkan dosen menjelaskan tentang kontrak belajar, prosedur-prosedur yang harus dilakukan selama perkuliahan, dan memberikan motivasi kepada kami.
Lalu setelah itu, dosen langsung memberikan tugas berupa
1. Harus mendaftarkan forumtif.uad.ac.id
2. milis ALPRO
3. membuat blog portopolio
4. meringkas materi yang diberikan, lalu materinya tersebut harus di posting di blog portopolio.
sekian dan terima kasih ^^