Function Pada C++
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
void garis() // detail function
{
int i;
for(i=0;i<=40;i++)
{
cout << "-";
}
cout << endl;
}
void main() // main function
{
system ("cls");
garis(); // panggil function
cout << "NIM NAMA MAHASISWA" << endl;
garis(); // panggil function
cout << "M0197001 AMIR HAMZAH"<< endl;
cout << "M0197002 PAIMAN" << endl;
garis(); // panggil function
}
#include <conio.h>
#include <stdlib.h>
void garis() // detail function
{
int i;
for(i=0;i<=40;i++)
{
cout << "-";
}
cout << endl;
}
void main() // main function
{
system ("cls");
garis(); // panggil function
cout << "NIM NAMA MAHASISWA" << endl;
garis(); // panggil function
cout << "M0197001 AMIR HAMZAH"<< endl;
cout << "M0197002 PAIMAN" << endl;
garis(); // panggil function
}
Comments
Post a Comment
Terimakasih telah berkunjung dan berkomentar disini...