RendraTriyanto

Soal Nomor 1 - Pemogram Terstruktur !

Jun 23rd, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. // Struktur Program Dengan Menggunakan Fungsi Prototype
  2. // Nama : Rendra Triyanto
  3. // NIM  : 17.12.0276
  4. // Kelas: S1 - Sistem Informasi - 04
  5.  
  6. #include <iostream>
  7. #include <conio.h>
  8.  
  9. using namespace std;
  10.  
  11. //prototipe fungsi
  12. tipe_data nama_fungsi(tipe_data_parameter1,tipe_data_parameter2,...);
  13.  
  14. //fungsi utama
  15. int main(){
  16.     Statement_yang_akan_dilakukan;
  17.     ...
  18.     return 0;
  19. }
  20.  
  21. //implementasi fungsi
  22. tipe_data nama_fungsi(parameter1,parameter2,...){
  23.     Statement_yang_akan_dilakukan;
  24.     ...
  25. }
  26.  
  27. // Struktur Program Dengan Tidak Menggunakan Fungsi Prototype
  28. // Nama : Rendra Triyanto
  29. // NIM  : 17.12.0276
  30. // Kelas: S1 - Sistem Informasi - 04
  31.  
  32. #include <iostream>
  33. #include <conio.h>
  34.  
  35. using namespace std;
  36.  
  37. // Fungsi
  38. void nama-fungsi (type_data, parameter)
  39. {
  40.   Isi Dari Fungsi
  41. }
  42. // Badan Program
  43. {
  44.   Isi Dari Badan Program
  45. }
Advertisement
Add Comment
Please, Sign In to add comment