You are on page 1of 2

//Bài Thực Hành Số 1, Bài 1: Viết chương trình in ra dòng Hello,

World:
#include <iostream>
#include <conio.h>
using namespace std;

int main1()
{
cout << "Hello, World!";
getch();
return 0;
}

//Bài Thực Hành Số 1, Bài 3


#include <iostream>
#include <conio.h>
using namespace std;

int main3()
{
cout<<"\n /////";
cout<<"\n +-----+";
cout<<"\n(| o o |)";
cout<<"\n | ^ |";
cout<<"\n | '-' |";
cout<<"\n +-----+";
getch();
return 0;
}

//Bài Thực Hành Số 1, Bài 4


#include <iostream>
#include <conio.h>
using namespace std;

int main4()
{
cout<<"\n \/\\";
cout<<"\n \/ \\";
cout<<"\n +----+";
cout<<"\n | .-.|";
cout<<"\n | | ||";
cout<<"\n +-+-++";
getch();
return 0;
}
//Bài Thực Hành Số 1, Bài 5
#include <iostream>
#include <conio.h>
using namespace std;
int main5()
{
cout<<"\n********* *** * *";
cout<<"\n* * * * *** * *";
cout<<"\n* * * * ***** * *";
cout<<"\n* * * * * * *";
cout<<"\n* * * * * * *";
cout<<"\n* * * * * * *";
cout<<"\n* * * * * * *";
cout<<"\n* * * * * * *";
cout<<"\n********* *** * *";
getch();
rerun 0;
}
//Bài Thực Hành Số 1, Bài 6
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
int main6()
{
cout<<"Xin chao, ten toi la Hoa\n";
cout<<"Ban ten la gi: ";
string username;
getline(cin,username);
cout<<"Xin chao ban "<< username<<"\n";
getch();
return 0;
}

You might also like