Selasa, 19 April 2011

Program Menghitung Nilai X

0 komentar

#include <iostream.h>
#include <conio.h>
int tambah5(int x)
{
    return (x+5);
}

main() {
     int x, y;
     cout << "Masukkan harga x : "; cin >> x;
     y = tambah5(x);
     cout << "Setelah masuk fungsi bernilai : " << y;
     getch();
     return 0;
     }
Hasil:

Leave a Reply

Labels