Skip to content

Instantly share code, notes, and snippets.

View tabvn's full-sized avatar

Toan tabvn

  • Danang, Vietnam
View GitHub Profile
#include <iostream>
#include <string>
using namespace std;
string s = "Truong Duong Phong";
size_t stringLength = s.size();
char c[30];
@tabvn
tabvn / del.cpp
Created September 27, 2018 14:05
#include <iostream>
using namespace std;
int giaiThua(int num){
if(num == 0){
return 1;
}
@tabvn
tabvn / clockhand.cpp
Last active September 27, 2018 15:31
#include <iostream>
#include <stdio.h>
#include <iomanip>
using namespace std;
float gocTaoBoiKimGio(float gio){
float deg = 360 - (float)(30 * gio);
Đề 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 đó:
#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){
@tabvn
tabvn / A.cpp
Created October 2, 2018 13:41
Tam Giac
#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){
@tabvn
tabvn / docso.cpp
Created October 4, 2018 03:03
Đọc số có 2 chữ số
#include <iostream>
#include <string>
using namespace std;
string docHangChuc(int n){
string s;
switch (n) {
#include <iostream>
#include <string>
using namespace std;
int main(){
int m,k;
string s;
cin >> m >> k;
@tabvn
tabvn / NKCARD.cpp
Last active October 12, 2018 16:24
#include <iostream>
#include <vector>
using namespace std;
struct Num{
int value;
bool deleted;
@tabvn
tabvn / NKCARD.cpp
Created October 13, 2018 03:06
NKCARD.cpp
#include <iostream>
#include <vector>
using namespace std;
struct Num{
int value;
bool deleted;