Wednesday, March 8, 2017

Learn From Youtube

You can do follow him

ការបញ្ចូលនិងបញ្ចេញទិន្នន័យ

គេមានអនុគមន៍សម្រាប់បញ្ចូលនិងបញ្ចេញទិន្នន័យ ដូចជា៖

  • printf(); and cprintf(); សម្រាប់បញ្ចូលទិន្នន័យ ។
  • scanf(); and cscanf(); សម្រាប់បញ្ចូលទិន្នន័យ ។
យើងក៏ត្រូវប្រើ Format control ដើម្បីជាជំនួយ ក្នុងការបញ្ចូលទិន្នន័យដូចជា៖ %d , %s , %f ,%ld
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();
   }

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();
   
    }

C code"Hello World"

#include<stdio.h>
#include<conio.h>
 void main(){
        clrscr();
        
        printf("Hello World");
 
       getch();

}