วันพุธที่ 10 มิถุนายน พ.ศ. 2552

สัปดาห์ที่ 5

#include
#include
void main()
{
float rad; //declared real variable
const float PI= 3.14159; // defined constant PI
//start statement
clrscr();
cout<< "Please enter radius of circle : ";
cin>>rad;
float area = PI*rad*rad;//declarad variable at position that want to use
cout<<"\n\nRadius of circle = "<< rad;
cout<<"\n\nArea of circles = \a\n"<< area;
getch();
}
***********************************************************
#include
#include
void main()
{
clrscr();
cout<< "Display change base number ..."<< endl<< endl;
cout<< "10 decimal to hexadecimal = "cin>> number1,number2,number3;//enter 3 amount integer from keyboard
cout<<"\nPress any key to display.... " ;
getch();
clrscr();
//process display value from variable
cout<<"You enter 3 number: \n\a";
cout<<"Value of number1 :\n"getch();//wait press any key
}
****************************************************
/*Program : cout_ex2.cpp
Process : display cout object in iostream.h*/
#include
#include
void main()
{
clrscr();
cout<<"This is Turbo C++Program."<<" "<<" It is very easy.";
cout<<"I love C++."<<" "<<" It's high level language.";
getch();
}
********************************************
/*progarm:cout_exp.cpp
process:display cout object in iostream.h*/
#include
#include
void main()
{
cout<<"This is Turbo C++Program";
cout<<"C++ is hight language";
getch();
}
**************************************************
/* Program :cout_mat.cpp
process:Display mathmetic calculate result*/
#include
#include
void main()
{int number1,number2;
float x,y,z ;
//set value of variable
number1=20;
number2=30;
x=25.25;y=30.05;z=10.75;
//display calculation result
clrscr();
cout<<"Program Display Mathmetic calculation"}
***************************************************
/*program:endl_exp.cpp
process:display cout object in iostream.h*/
#include
#include
void main()
{ clrscr(); //clear screen standard function form conio.h
cout<<"This is Turbo C++Progarm"}
**************************************************
/*Program : escape.cpp
Process : display with escape sequence*/
#include
#include
void main()
{
clrscr();//clear screen
cout<<"Hello Program C++"<<'\n'//new line
cin>>number2; //enter inter from keyboard
cout<<"\nEnter 1 character :";
cin>>ch;//enter 1 character from keyboard
cout<<"\n\nPress any key to display...";
getch();//wait press any key
clrscr();
//Program display value from variable
cout<<"You enter number and character :\n\a";
cout<<"Value of number 1 :"getch();
}
******************************************************
/* Program :Func_Mat.cpp
process:Display using mathmetic function */
#include
#include
#include
#include
void main()
{
double x=9.0 ,y=2.0;
clrscr();
cout<<"Display useing mathmetic functions...\a"}
****************************************************
#include
#include
#include
void main()
{ float A=125.25125;
float B=10.7525;
float C=212.15;
clrscr(); //function in conio.h for clear screen
cout<<"Display set precision of float number..."

วันอังคารที่ 2 มิถุนายน พ.ศ. 2552

สัปดาห์ที่ 4

ใช้ Turbo C เขียนประวัติส่วนตัว
#include
#include
void main()
{
clrscr();
cout<<"My name is Kittipong Srethumma\n";
cout<<"No.2 Telecom\n";
cout<<"Study at Samutsongkhram Technical Collage\n";
cout<<"Date 2/2/1990\n";
getch();
}

สัปดาห์ที่ 3

ฝึกใช้โปรเเกรม Turbo C
/*Program : First.CPP
Written by: Mr.Kittipong
Date : 27/5/2009 */
#include
#include void main(void)
{
clrscr();
cout<< "My name is Mr.kittipong Srethumma \n";
cout<< "Electronics Department store \n";
getch();
}

/*Program :size_men.cpp
Process : Display size of menory for each simple data typewritter by Mr.kittipong
data :27/5/2552*/
#include
#include
void main(void)
{
clrscr();//clear screen in conio.h
cout<< "Size of char= "<cout<< "Size of unsigned char="<cout<< "Size of int= "<cout<< "Size of unsigned int="<cout<< "Size of short int=" <cout<< "Size of long int=" <cout<< "Size of unsigned long =" <cout<< "Size of float=" <cout<< "Size of double= "<cout<< "Size of long double "< cout<< "Size of long=" <getch();//wait for press any key}

สัปดาห์ที่ 2

ทำเเบบฝึกหัดท้ายบทที่ 1

สัปดาห์ 1

สมัคร G-mail เเละสร้าง Blog