Skip to content

Instantly share code, notes, and snippets.

View Huynhnghi's full-sized avatar

Nguyễn Thị Huỳnh Nghi Huynhnghi

View GitHub Profile
#include <stdio.h>
#include <math.h>
// Hàm kiểm tra xem một số có phải là số chính phương hay không
int is_chinh_phuong(int num) {
int sqrt_num = sqrt(num);
return (sqrt_num * sqrt_num == num);
}
// Hàm đếm số lượng số chính phương nhỏ hơn n và in ra các số đó