Showing posts with label c. Show all posts
Showing posts with label c. Show all posts
Tuesday, February 14, 2017
How to Change Add themes in CodeBocks C C IDE
How to Change Add themes in CodeBocks C C IDE
In this video tutorial i will show you how to change the background theme in CodeBlocks IDE
Note-Theme Code link-https://docs.google.com/file/d/0B-nG6oJdQsyRVl83MGRDNkJLN1U/edit?pli=1
Note-Theme Code link-https://docs.google.com/file/d/0B-nG6oJdQsyRVl83MGRDNkJLN1U/edit?pli=1
Enjoy this awesome trick...& for more tricks keep visiting this blog...:)
REGARDS
Shankha Jana
Available link for download
Sunday, January 8, 2017
Hà m sắp xếp mảng tÄng dần trong láºp trình C
Hà m sắp xếp mảng tÄng dần trong láºp trình C

Run demo: http://www.tutorialspoint.com/compile_c_online.php

Hàm s?p x?p m?ng t?ng d?n trong l?p trình C
C 2016
#include <stdio.h>
int a[100]; //Khai báo m?ng array kích th??c 100
int main() //Hàm thân ch?y ch??ng trình b?t bu?c có
{
int i,j,n,k; //Khai báo bi?n ki?u int
printf("Nhap so mang cua phan tu: "); //Hi?n th? màn hình
scanf("%d", &n); //Nh?p vào s? l?n l?p
for (i = 0; i < n; i++) //vòng l?p for
{
printf("nhap phan tu thu %d: ", i + 1);
scanf("%d", &a[i]); //Nh?p vào m?ng s? i
}
for (i = 0; i < n-1;i++){
for (j = i+1; j < n;j++){
if (a[i]>a[j]) //T?ng d?n or Gi?m d?n a[i]<a[j]
{
k = a[i]; //k là bi?n t?m l?u giá tr?
a[i] = a[j]; //th?c hi?n ??i ch? d?i chó
a[j] = k;
}
}
}
printf("mang sau khi da sap xep la: ");
for (i = 0; i < n; i++) {
printf(" %d ", a[i]); //M?i l?n l?p in ra m?ng i
}
}
Ki?n Th?c C?n Có:
1. Khai báo ki?n int ?
2. Khai báo ki?u Array m?ng ? M?ng 1 chi?u và m?ng 2 chi?u là gì?
3. printf là gì?
4. scanf là gì ?
5. Vòng l?p for là gì ?
1. Khai báo ki?n int ?
2. Khai báo ki?u Array m?ng ? M?ng 1 chi?u và m?ng 2 chi?u là gì?
3. printf là gì?
4. scanf là gì ?
5. Vòng l?p for là gì ?
Available link for download
Sunday, November 20, 2016
How to Display A programs own Source Code as Output in C programming Language
How to Display A programs own Source Code as Output in C programming Language
Though you may think that is problem is quite complex but actually ,the concept behind this program is very simple.
A predefined macro __FILE__ contains the location of a C programming file.we will be using this macro in our program.
Source Code-
Output-

A predefined macro __FILE__ contains the location of a C programming file.we will be using this macro in our program.
Source Code-
1 | #include <stdio.h> |

Available link for download
Sunday, November 13, 2016
How to find remainder without using MODULUS OPERATOR in C
How to find remainder without using MODULUS OPERATOR in C
Here is the source code for finding remainder without using MODULUS OPERATOR in C Language
1 | #include<stdio.h> |
Output-

Available link for download
Sunday, October 16, 2016
Hà m Äá»i chá» dùng con trá» trong láºp trình C
Hà m Äá»i chá» dùng con trá» trong láºp trình C
Hàm ??i ch? dùng con tr? trong l?p trình C
C 2016
#include<stdio.h>
//viet mot ham de trao doi hai gia tri va chuyen vao 2 so kieu int
void swap(int *num1, int *num2) {
int temp; //khai bao bien luu tru
temp = *num1;
*num1 = *num2;
*num2 = temp;
}
int main() {
int num1, num2; //Khai bao bien kieu int
//Nhap vao so num1 va num2
printf(" Nhap so thu nhat: ");
scanf("%d", &num1);
printf(" Nhap so thu hai: ");
scanf("%d", &num2);
swap(&num1, &num2); //goi ham doi cho
//In ra man hinh
printf(" Sau khi trao doi:");
printf(" So thu nhat: %d", num1);
printf(" So thu hai: %d", num2);
return (0);
}Chú ý: Ch??ng trình s? ch?y t? trên xu?ng d??i swap ch?y tr??c nên
ph?n In ra màn hình s? l?y giá tr? c?a swap khi ?ã ??i ch? 
Available link for download
Subscribe to:
Posts (Atom)