Senin, 31 Maret 2014

Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.18 0 komentar
5.11 Figure 5.23 Program to Draw a Moving Ball



Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.16 0 komentar
5.9 Figure 5.12 Program to Draw a Quilt



Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.15 0 komentar
5.9 Figure 5.19 Finding a Function Root Using the Bisection Method



Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.12 0 komentar
5.9 Figure 5.16 Using a Function Parameter


Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.10 0 komentar
5.8 Figure 5.14 Validating Input Using do - while Statement


Minggu, 30 Maret 2014

Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 09.00 0 komentar
5.7 Figure 5.13 Nested Counting Loop Program


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 08.59 0 komentar
5.7 Figure 5.12 Program to Process Bald Eagle Sightings For a Year


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 08.57 0 komentar
5.6 Figure 5.12 Batch Version of sum of Exam Score


Kamis, 27 Maret 2014

Chapter 3 Ebooks HOW SOLVE IT BY COMPUTER 3.8

Diposting oleh Unknown di 17.12 0 komentar
Computing The Nth Fibonanci Number

Algoritma :
1. Deklarasi
    input : Banyaknya baris Fibonanci
    output : Jumlah deret Fibonanci
2. Deskripsi
    int i , c, masuk , a, b , jumlah;

Flowchart :


c++:




Chapter 3 Ebooks HOW SOLVE IT BY COMPUTER 3.7

Diposting oleh Unknown di 10.33 0 komentar
Raising a Number to a Large Power

1. Analisis
    Menghitung Bilangan Berpangkat sampai N
2. Identifikasi
    Input : Bilangan dan btasan pangkat
    Output : hasi Perpangkatan
3. Algoritma
    a. Deklarasi
        a,b,c,hasil (integer)
    b. Deskripsi
        while (1)
        if(b<=0)
        c=1
        while (!(c>b))
        c = c + 1

Flowchart :




c++ :



Latihan Individu SAP Pertemuan 3

Diposting oleh Unknown di 09.38 0 komentar
Menentukan Nilai akhir

1. Analisis :
    Menentukan Nilai Akhir
2. Identifikasi :
    input : Nilai Pertama , nilai Kedua , nilai Ketiga
    Output : Nilai akhir

Flowchart :



Latihan Individu SAP Pertemuan 3

Diposting oleh Unknown di 09.23 0 komentar
Menentukan Persamaan Kuadrat

Algoritma :
Input : a,b,c
Output : Persamaan Kuadrat
a,b,c,x1,x2,D (Float)

Flowchart :


c++ :




Latihan Individu SAP Pertemuan 3

Diposting oleh Unknown di 08.53 0 komentar
Menetukan Bilangan Genap dan Ganjil

Algoritma :
1. Deklarasi
    bilangan , sisa (integer)
    keterangan (string)
2. Deskripsi
    inputkan bilangan;
    keterangan = " Bilangan Genap ";
    sisa = bilangan % 2;
    if ( sisa = 1)
    keterangan = " Bilangan Ganjil "


Flowchart :


c++ :


Latihan Individu SAP Pertemuan 2

Diposting oleh Unknown di 08.33 0 komentar
Jarak 2 Titik

Flowchart :


c++ :


Latihan Individu SAP Pertemuan 2

Diposting oleh Unknown di 08.31 0 komentar
Konvresi Suhu

Flowchart :



c++ :




Latihan Kelompok PPT Pertemuan 2

Diposting oleh Unknown di 08.27 0 komentar
Algoritma mengambil Uang dan Transfer di ATM

flowchart :



c++ :



Selasa, 25 Maret 2014

Latihan Individu SAP Pertemuan 4

Diposting oleh Unknown di 09.57 0 komentar
Membuat Tabel Perkalian

1. Analisis :
    Membuat tabel Perkalian
2. Identifikasi
    Output : Tabel Perkalian

c++ :


Latihan Individu SAP Pertemuan 4

Diposting oleh Unknown di 09.54 0 komentar
1. Analisis :
     Membuat Diamond dengan perulangan
2. Identifikasi
    Input : nilai n
    output : diamond
3. Algoritma :
    Deklarasi
       int i, n, odd{50};
       const char spasi = 177;
       const char diamond = ' * ';

c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 09.45 0 komentar
5.6 Figure 5.10 Sentinel-controlled while Loop

#include <cstdlib>
#include <iostream>
#define sentinel -99

using namespace std;

int main(int argc, char *argv[])
{
    int sum=0,score;
   
    cout<<"Enter First Score(or "<<sentinel<<" to quit> ";
    cin>>score;
    while(score != sentinel) {
                sum += score;
                cout<<"Enter Next score ("<<sentinel<<"to quit)> ";
                cin>>score;
                }
    cout<<"Sum of Exam scores is "<<sum<<endl;
   
    system("PAUSE");
    return EXIT_SUCCESS;
}


c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 09.39 0 komentar
5.5 Figure 5.9 Program To Monitor Gasoline Storage Tank

#include <cstdlib>
#include <iostream>
#define capacity 80000.0
#define min_pct 10
#define gals_per_brl 42.0

double monitor_gas(double min_supplay,double start_supply);

using namespace std;

int main(void)
{
    double start_supply, min_supply, current;
    min_supply = min_pct/100.0*capacity;
    cout<<"Numbers Of Barrels currently in tank : ";
    cin>>start_supply;
   
    current = monitor_gas(min_supply, start_supply);
    cout<<"Only Barrels are left."<<current<<endl<<endl;
    cout<<"*** WARNING ***"<<endl;
    cout<<"Available Supply is lesss than percent of"<<min_pct<<"tank's "<<endl;
    cout<<capacity<<"barrel capacity."<<endl;
   
    system("PAUSE");
    return EXIT_SUCCESS;
}

double monitor_gas(double min_supply,double start_supply)
{
       double remov_gals, remov_brls,current;
              for(current = start_supply; current >= min_supply; current -= remov_brls){
                          cout<<"Barrels are available."<<current<<endl<<endl;
                          cout<<"Enter number of gallons removed : ";
                          cin>>remov_gals;
                          remov_brls = remov_gals/gals_per_brl;
                         
                          cout<<"After removal of"<<remov_gals<<"gallone ("<<remov_brls<<"barrels)"<<endl;
                          }
                          return(current);
}
                         

c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 09.36 0 komentar
5.4 Figure 5.8 Displaying a Celcius to Farenheit Conversion Table

#include <cstdlib>
#include <iostream>
#define cbegin 10
#define climit -5
#define cstep 5

using namespace std;

int main(int argc, char *argv[])
{
    int celcius;
    double Farenheit;
   
    cout<<"Celcius \t farenheit"<<endl<<endl;
   
    for(celcius=cbegin;celcius>=climit;celcius -= cstep) {
       Farenheit= 1.8*celcius+32.0;
       cout<<"Celcius : "<<celcius<<"\t farenheit "<<Farenheit<<endl;
       }
     
    system("PAUSE");
    return EXIT_SUCCESS;
}


c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND DESIGN PROGRAM IN C

Diposting oleh Unknown di 09.34 0 komentar
5.4 Figure 5.7 Function to Compute Factorial

#include <cstdlib>
#include <iostream>

using namespace std;

int faktorial (int n){
    int i, product=1;
 
    for (i=n; i>1; --i){
        product=product*i;
        }
        return product;
        }
     
int main(int argc, char *argv[])
{
    int n;
    cout<<"Inputkan Nilai : ";
    cin>>n;
    cout<<"Faktorial : " <<faktorial(n)<<endl;
 
    system("PAUSE");
    return EXIT_SUCCESS;
}

c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DESIGN IN C

Diposting oleh Unknown di 09.31 0 komentar
5.4 Figure 5.5 Using a for Statement in a Counting Loop

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int count_emp, number_emp;
    float rate,pay,total_pay=0.0,hours;
   
    cout<<"Enter Number Og Employees> ";
    cin>>number_emp;
    for(count_emp=0;count_emp < number_emp; count_emp+=1){
    cout<<"hours> ";
    cin>>hours;
    cout<<"Rate> $ ";
    cin>>rate;
    pay= hours*rate;
    cout<<"pay is= $ "<<pay<<endl;
    total_pay=total_pay+pay;
}

cout<<"All Employes processed"<<endl;
cout<<"Total Payroll is "<<total_pay<<endl;

    system("PAUSE");
    return EXIT_SUCCESS;
}

c++ :


Ebooks Chapter 5 PROBLEM SOLVING AND PROGRAM DEIGN IN C

Diposting oleh Unknown di 09.27 0 komentar
5.3 Figure 5.4 Program To Compute Company Payroll

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int count_emp=0, number_emp;
    double rate,pay,total_pay=0,hours;
   
    cout<<"Enter Number Of employees : ";
    cin>>number_emp;
   
    while(count_emp<number_emp){
    cout<<"Karyawan "<<count_emp+1<<endl;
    cout<<"hours> ";
    cin>>hours;
    cout<<"Rate> ";
    cin>>rate;
    pay=hours*rate;
    cout<<"Pay is = $ "<<pay<<endl;
    total_pay=total_pay+pay;
    count_emp=count_emp+1;
}

cout<<"All Employees Processed"<<endl;
cout<<"Total payroll is " <<total_pay<<endl;

    system("PAUSE");
    return EXIT_SUCCESS;
}

C++ :


Latihan Kelompok PPT Pertemuan 4

Diposting oleh Unknown di 09.15 0 komentar
Simulasi Pembelian Bahan Bakar

1. Deklarasi :
    Liter : Integer
    Uang : Integer
 
2. Deskripsi :
    Read (liter);
    Options Liter
    1. 1 liter 6500
    2. 2 liter 13000
    3. 3 liter 19500
       End (select)
       write (L)

C++:

class Fuel {
    Public :
                 void input();
                 void process ();
                 void output ();
    Private :
                int output;
                int liter;
};

void Fuel :: input (){
       cout<<"Enter The Price of Fuel : " ;
       cin>>output;
       cout<<"type of fuel : "; cin>>output;
}

void Fuel :: process(){
    output = liter * money
}

void Fuel :: output (){
cout<<"The Output Of The Process : "<<result;
}

int main(int argc, char * argv []) {
   Fuel X;
          X input ();
          X process ();
          X output ();
System ("pause");
Return exit_succes;
}/* Import to jeliot : */
{Public class fuel

void static void input ();
void static void process();
void static void output ();

private int output;
private int liter;
};
Public void input();{
system.out.print ("Enter the Price of fuel")
output=input.readint();
system.out.print("type of fuel");
output=input.readint();
}
Public void process(){
output=liter * money
}
Public void output(){
syetem.out.print("output of the process : " + result);
}

Public static void main(){
X = new fuel ();
X.input();
X.process();
X.output();
}}

Latihan Individu PPT Pertemuan 4

Diposting oleh Unknown di 08.58 0 komentar
Sentinel menentukan terkecil , terbesar , dan jumlah semua bilangan positif

Flowchart :



Latihan Individu PPT Pertemuan 4

Diposting oleh Unknown di 08.56 0 komentar
Bilangan Habis Dibagi 3 dan 5

1. Deklarasi :
    i : integer (bilangan 1 - 100)

2. Deskripsi :
    Read (i)
    i <- 1 - 100
    for (int i=1; i<=100; 1++)
    if(i mod 3==0)
    Write
     Else (i mod 5==0)
    Write i

Flowchart :


c++ :


REFLEKSI ALPRO MINGGU KE 4

Diposting oleh Unknown di 08.44 0 komentar
Pada Minggu Ke 4 ini kami battle sokoban game , meskipun kelompok saya awalnya beruntung dalam permainan itu tapi pada akhirnya kalah juga , tapi walaupun begitu kelompok saya sudah berusaha

yang diperoleh minggu ini :

hari ini saya belajar perulangan (loop)
perulangan for , while , do while

Yang Belum saya pahami :
Saya masih kurang paham coding menggunakan class

Usaha yang dilakukan untuk mengatasinya :

bertanya dengan teman atau kakak tingkat yang mengerti

Minggu, 23 Maret 2014

Chapter 3 Ebooks HOW SOLVE IT BY COMPUTER 3.6

Diposting oleh Unknown di 08.12 0 komentar
Generation of Pseudo-random Numbers

Algoritma :
1. Deklarasi
    r : integer (input angka acak)
    r,z : integer (output)

2. Deskripsi
    read (r)
    perulangan
    proses c <- 1283
               a <-  106
               m <- r+1
               x <- 1234
               z <- ((a*x)+c)%m
    write (r,z)


Flowchart :



c++ :


Chapter 3 Ebooks HOW SOLVE IT BY COMPUTER 3.5

Diposting oleh Unknown di 08.05 0 komentar
Computing the Prime Factors an Integer

Algoritma :
1. Deklarasi
    Bil (integer)

2. Deskripsi
    Read (Bil)
    Bil <- bil / 2
    Bil <- bil / 3
    Write : Faktorial Prima


Flowchart :


c++ :


Chapter 3 Ebooks HOW SOLVE IT BY COMPUTER 3.4

Diposting oleh Unknown di 08.01 0 komentar
Generating Prime Numbers

Algoritma :
1. Deklarasi
    n : integer (input)
    n,i : (output)

2. Deskripsi
    read (n)
    perulangan
    proses i <- 2
    i > n
    i % 2=0 && i!=2
    i%3=0
    i<- i + 1
    write (n,i)

Flowchart :


c++ :


 

Rizka Site Copyright © 2012 Design by Antonia Sundrani Vinte e poucos