This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
string s = "Truong Duong Phong"; | |
size_t stringLength = s.size(); | |
char c[30]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int giaiThua(int num){ | |
if(num == 0){ | |
return 1; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdio.h> | |
#include <iomanip> | |
using namespace std; | |
float gocTaoBoiKimGio(float gio){ | |
float deg = 360 - (float)(30 * gio); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Đề bài: | |
m: số bút mua sẽ được tặng thêm 1 cái | |
n: tổng số bút cần phải mua | |
t: là số tiền cho 1 cái bút | |
gọi x là số bút phải trả tiền | |
gọi y là số bút được khuyến mãi | |
khi đó: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
/* | |
Return false vi tri da ton tai | |
Retur true: chua ton tai, vi tri con trong => OK | |
*/ | |
bool kiemtra(int *arr, int num, int max){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
/* | |
để 3 cạnh là 1 tam giác thì: | |
+ Tổng 2 cạnh phải lớn hơn canh còn lại | |
+ Tam giac vuông cân thì sẽ có chu vi lơn nhất | |
*/ | |
bool laTamGiac(long int a, long int b, long int c){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
string docHangChuc(int n){ | |
string s; | |
switch (n) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main(){ | |
int m,k; | |
string s; | |
cin >> m >> k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
struct Num{ | |
int value; | |
bool deleted; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
struct Num{ | |
int value; | |
bool deleted; | |