Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

C.

Srtruktur program bahasa C #include <file-include> file header main () { Statement; }

File header berisi prototype (judul, nama dan sintak)sekumpulan fungsi tertentu (akan disimpan di file pustaka/ file library dengan executable .LIB) Inisial: prototype dari fungsi-fungsi pustaka printf ( ) dan scanf ( ) terdapat di file header stdio.h Penulisan file header #include <stdio.h> Atau #include stdio.h Inisial printf( ) getch( ) cout ( )
Borland C++

File header <stdio.h> <conio.h> <iostream.h>


Created By F@Y

1) Buat program dengan layout sebagai berikut

2. Buat program dengan layout sebagai berikut:

Borland C++

Created By F@Y

Jawaban 1
#include<stdio> #include<conio> main() { printf("====================================\n"); printf("Selamat Datang\n"); printf("Di Lab B dan C \n"); printf("Kampus Cabang Wolter Monginsidi\n"); printf("====================================\n"); getch(); }

Jawaban 2.
#include<stdio> #include<conio> #include<iostream> main() { cout<<"\tBIODATA MAHASISWA"<<endl; printf("===================================\n"); cout<<"NIM : 11064123"<<endl; printf("Nama : Blinkz \n"); printf("Kelas : 12.6A\n"); printf("Alamat : Jl. Pancoran Barat No.60\n"); printf("HP : 085287453532 \n"); printf("===================================\n"); getch(); }

Borland C++

Created By F@Y

You might also like