Learn From Youtube
You can do follow him
IT KHMER
Wednesday, March 8, 2017
ការបញ្ចូលនិងបញ្ចេញទិន្នន័យ
គេមានអនុគមន៍សម្រាប់បញ្ចូលនិងបញ្ចេញទិន្នន័យ ដូចជា៖
- printf(); and cprintf(); សម្រាប់បញ្ចូលទិន្នន័យ ។
- scanf(); and cscanf(); សម្រាប់បញ្ចូលទិន្នន័យ ។
Ex:
// input and output information
#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
int age;
printf("Enter Your Age :"); scanf("%d",&age); // input
printf("Your age is %d", age); // output
getch();
}
// input and output information
#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
int age;
printf("Enter Your Age :"); scanf("%d",&age); // input
printf("Your age is %d", age); // output
getch();
}
C++ code
Hello we will learn together about C++ language
Using textcolor();
យើងប្រើ អនុគមន៍ textcolor(number); ដើម្បីកំណត់ពណ៌អោយព័ត៌មានដែលបញ្ចេញ។ យើងត្រូវប្រើវានៅក្នុង Header file #include<conio.h> ជាមួយអនុគមន៍ cprintf(); ។
Ex:
#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
textcolor(BLUE);
cprintf("This color is BLUE");
getch();
}
Ex:
#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
textcolor(BLUE);
cprintf("This color is BLUE");
getch();
}
C code"Hello World"
#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
printf("Hello World");
getch();
}
#include<conio.h>
void main(){
clrscr();
printf("Hello World");
getch();
}
Subscribe to:
Comments (Atom)