CSC425_Function_additionalNotes_VoidFunctionWithNoParameters
CSC425_Function_additionalNotes_VoidFunctionWithNoParameters
int main()
{
/*
===============================
hello
hello
hello
=============================== */
line();
for (int x=0;x<3;x=x+1)
{
hello(); //reusable
}
line();
return 0;
//function definition
void hello()
{
void line()
{
cout << "\n ========================";
return;
}
/* Write a complete program to display the following output
Welcome to ABC Transport Sdn Bhd --- > function header()
********************** --- > function star()
int main()
{
//caller
header();
star();
menu();
return 0;
}
//function definition
void header()
{
cout << "\n Welcome to ABC Transport Sdn Bhd ";
return;
}
void star()
{
cout << "\n **************************** ";
return;
}
void menu()
{
cout << "\n list of Menu ";
cout << "\n 1. Nasi goreng " ;
cout << "\n 2. Nasi ayam " ;
cout << "\n 3. Mee goreng ";
cout << "\n 4. Mee kuah ";
cout << "\n 5. Bihun sup ";
cout << "\n Please make your choice : ";
return;
}