Tại sao sau khi chạy chỉ mỗi nhập xuất n thôi mà không mà không hiện mấy cái kia ạ??
#include "pch.h"
#include <iostream>
using namespace std;
int nguyento(int n);
int lietke();
int main()
{
int n;
cout << "\nnhap n: "; cin >> n;
}
int nguyento(int n)
{
if (n < 2)
cout << "\nkhong co so nguyen to nao";
for (int i = 2; i <= sqrt(n); i++)
{
if (n%i == 0)
cout << "\nkhong cos so nguyen to nao";
else cout << "\nn la so nguyen to";
}
return nguyento(n);
}
int lietke()
{
int dem = 0, i = 2, n = 0;
while (dem < n)
{
if (nguyento(i) == 1)
{
cout << i;
dem++;
}
i++;
}
return lietke();
}
nhap n: 8 C:\Users\KIMCHI\Documents\Visual Studio 2019\Backup Files\v1_b13\x64\Debug\v1_b13.exe (process 8000) exited with code 0. To automatically close the console when debugging... Press any key to close this window...