Some execercises were done in two ways.
Khoa CNTT-Trường Đại Học Khoa Học Tự Nhiên
Exe_1: s(n) = 1 + 2 + 3 + ... + n
Exe_2: s(n) = 1^2 + 2^2 + 3^2 + ... + n^2
Exe_3: s(n) = 1 + 1/2 + 1/3 + ... + 1/n
Exe_4: s(n) = 1/2 + 1/4 + 1/6 + ... + 1/2n
Exe_5: s(n) = 1 + 1/3 + 1/5 + ... + 1/(2n + 1)
Exe_6: s(n) = 1/(1 * 2) + 1/(2 * 3) + ... + 1/(n * (n + 1))
Exe_7: s(n) = 1/2 + 2/3 + 3/4 + ... + n/(n + 1)
Exe_8: s(n) = 1/2 + 3/4 + 5/6 + ... + (2 * n + 1)/(2 * n + 2)
Exe_9: s(n) = 1 * 2 * 3 * ... * n
Exe_10: T(x, n) = x^n
Exe_11: s(n) = 1 + 1.2 + 1.2.3 + ... + 1.2.3....n
Exe_12: s(n) = x + x^2 + x^3 + ... + x^n
Exe_13: s(n) = x^2 + x^4 + x^6 + ... + x^2n
Exe_14: s(n) = x + x^3 + x^5 + ... + x^(2n + 1)
Exe_15: s(n) = 1 + 1/(1 + 2) + 1/(1 + 2 + 3) + ... + 1/(1 + 2 + 3 + ... +n)
Exe_16: s(n) = x + x^2/(1 + 2) + x^3/(1 + 2 +3) + ... + x^n/(1 + 2 + 3 + ... + n)
Exe_17: s(n) = x + x^2/2! + x^3/3! + ... + x^n/n!
Exe_18: s(n) = 1 + x^2/2! + x^4/4! + ... + x^(2n)/(2n)!
Exe_19: s(n) = 1 + x + x^3/3! + x^5/5! + ... + x^(2n+1)/(2n+1)!
Exe_20: Liet ke tat ca uoc so cua nguyen duong n
Exe_21: Tinh tong tat ca uoc so cua so nguyen duong n
Exe_22: Tinh tich tat ca uoc so cua so nguyen duong n
Exe_23: Dem so luong uoc so cua so nguyen duong n
Exe_24: Liet ke tat ca uoc so le cua so nguyen duong n
Exe_25: Tinh tong tat ca uoc so chan cua so nguyen duong n
Exe_26: Tinh tich tat ca uoc so le cua so nguyen duong n
Exe_27: Dem so luong uoc so chan cua so nguyen duong n
Exe_28: Tinh tong cac uoc so nho hon so nguyen duong n
Exe_29: Tim uoc so le lon nhat cua so nguyen duong n
Exe_30: Kiem tra xem co phai la hoan thien hay k?
Exe_31: Kiem tra so nguyen to
Exe_32: Kiem tra so chinh phuong
Exe_33: s(n) = sqrt(2 + sqrt(2 + sqrt( 2 + ... + sqrt(2 +sqrt(2)))))
Exe_34: s(n) = sqrt(n + sqrt(n-1 + sqrt(n-2 + ...sqrt(2+ sqrt(1)))))
Exe_35: s(n) = sqrt(1 + sqrt(2 + ...sqrt(n-1 + sqrt(n))))
Exe_36: s(n) = sqrt(n! + sqrt((n-1)! + sqrt((n-2)! + ...sqrt(2!+ sqrt(1!)))))
Exe_37: s(n) = (n + ((n-1) + ...(3 + 2^(1/2))^(1/3))^(1/(n-1)))^(1/n)
Exe_38: s(n) = (n + ((n-1) + ...(2 + 1^(1/2))^(1/3))^(1/(n)))^(1/n + 1)
Exe_39: s(n) = (n! + ((n-1)! + ...(2! + 1!^(1/2))^(1/3))^(1/(n)))^(1/n + 1)
Exe_40: s(n) = sqrt(2 + sqrt(x^n + sqrt( x^(n-1) + ... + sqrt(x^2 +sqrt(x)))))
Exe_41: s(n) = 1 / (1 + 1 / (1 + ... 1 / (1 + 1 / (1 + 1))))
Exe_42: Cho n la so nguyen duong. Tim gia tri nguyen duong k lon nhat sao cho s(k) < n. [s(k) = 1 + 2 + ... +k]
Exe_43: Dem so luong chu so cua so nguyen duong.
Exe_44: Tinh tong cac chu so cua so nguyen duong n
Exe_45: Tinh tich cac chu so cua so nguyen duong n
Exe_46: Dem so luong chu so le cua so nguyen duong n
Exe_47: Tinh tong cac chu so chan cua so nguyen duong n
Exe_48: Tinh tich cac chu so le cua so nguyen duong n
Exe_49: Tim chu so dau tien cua so nguyen duong n
Exe_50: Tim chu so dao nguoc cua so nguyen duong n
Exe_51: Tim chu so lon nhat cua so nguyen duong n
Exe_52: Tim chu so nho nhat cua so nguyen duong n
Exe_53: Dem so luong chu so lon nhat trong so nguyen duong n
Exe_54: Dem so luong chu so nho nhat trong so nguyen duong n
Exe_55: Dem so luong chu so dau tien cua so nguyen duong n
Exe_56: Kiem tra so nguyen duong n co toan chu so le hay khong
Exe_57: Kiem tra so nguyen duong n co toan chu so chan hay khong
Exe_58: Kiem tra so nguyen duong n co phai la so doi xung hay khong
Exe_59: (same as 58)
Exe_60: Kiem tra cac chu so cua so nguyen duong n co tang dan tu trai qua phai hay khong
Exe_61: Kiem tra cac chu so cua so nguyen duong n co giam dan tu trai qua phai hay khong
Exe_62: Tim uoc chung lon nhat cua a va b
Exe_63: Tim boi chung nho nhat cua a va b
Exe_64:
Exe_65:
Exe_66:
Exe_67: s(x, n) = x - x^2 + x^3 + ... +(-1)^(n+1).x^(n)
Exe_68: s(x, n) = -x^2 + x^4 - ... +(-1)^n.x^(2n)
Exe_69: s(x, n) = x - x^3 + x^5 - ... + (-1)^n.x^(2n + 1)
Exe_70: s(n) = 1 - 1/(1 + 2) + 1/(1 + 2 + 3) - ... + (-1)^(n+1).1/(1 + 2 + 3 + ... + n)
Exe_71: s(x, n) = -x + x^2 / (1 + 2) - x^3/(1 + 2 + 3) + ... +(-1)^n.x^n/(1 + 2 + 3 + ... +n)
Exe_72: s(x, n) = -x + x^2/2! - x^3/3! + ... + (-1)^n.x^n/n!
Exe_73: s(x, n) = -1 + x^2/2! - x^4/4! + ... + (-1)^(n+1).x^(2n)/(2n)!
Exe_74: s(x, n) = 1 - x + x^3/3! - x^5/5! + ... + (-1)^(n+1).x^(2n+1)/(2n+1)!
Exe_75: Kiem tra so nguyen 4 byte co dang 2k hay k?
Exe_76: Kiem tra so nguyen 4 byte co dang 3k hay k?
Exe_77 -> Exe_96: done in book
Exe_97: Viet chuong trinh nhap ba canh cua 1 tam giac, cho biet tam giac do la tam giac gi?
Exe_98:
Exe_99:
Exe_100:
Exe_101: Viet chuong trinh nhap vao thang nam. Cho biet thang do co bao nhieu ngay.
Exe_102: viet chuong trinh nhap vap 1 ngay(ngay-thang-nam). Tinh ngay ke ngay vua nhap(ngay thang nam)
Exe_103: viet chuong trinh nhap vap 1 ngay(ngay-thang-nam). Tinh ngay truoc ngay vua nhap(ngay thang nam)
Exe_104: viet chuong trinh nhap vap 1 ngay(ngay-thang-nam). Tinh ngay do la ngay thu bao nhieu trong nam
Exe_105: Hay in ra cach doc cua 1 so co 2 chu so
Exe_106: Hay in ra cach doc cua 1 so co 3 chu so
Exe_107:
Exe_108:
Exe_109: In ra bang cuu chuong
Exe_110:
Exe_111: Ve hinh
a.
*
* * *
* * * * *
* * * * * * *
b. *
* *
* *
* * * * * * *
c. *
* *
* * *
* * * *
d. *
* *
* *
* * * *
Exe_112: Ve hinh chu nhat co kich thuoc mxn
a. * * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
b. * * * * * * *
* *
* *
* * * * * * *