Skip to content

Instantly share code, notes, and snippets.

View tabvn's full-sized avatar

Toan tabvn

  • Danang, Vietnam
View GitHub Profile
@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) {
@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){
#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){
Đề 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 đó:
@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);
@tabvn
tabvn / del.cpp
Created September 27, 2018 14:05
#include <iostream>
using namespace std;
int giaiThua(int num){
if(num == 0){
return 1;
}
#include <iostream>
#include <string>
using namespace std;
string s = "Truong Duong Phong";
size_t stringLength = s.size();
char c[30];
//
// main.cpp
// homework
//
// Created by Toan on 9/18/18.
// Copyright © 2018 Toan. All rights reserved.
//
#include <iostream>
using namespace std;
@tabvn
tabvn / tim_ma_tran_nghich_dao_cap3.cpp
Last active September 18, 2018 05:31
tim_ma_tran_nghich_dao_cap3.cpp
//
// main.cpp
// homework
//
// Created by Toan on 9/18/18.
// Copyright © 2018 Toan. All rights reserved.
//
#include <iostream>
using namespace std;
@tabvn
tabvn / hinh_hop.cpp
Last active September 16, 2018 12:49
bai tap c++ can ban, hinh hop
//
// main.cpp
// homework
//
// Created by Toan on 9/16/18.
// Copyright © 2018 Toan. All rights reserved.
//
#include <iostream>
#include "math.h"