-
Notifications
You must be signed in to change notification settings - Fork 0
/
bai3.cs
37 lines (35 loc) · 935 Bytes
/
bai3.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Hw_3
{
class bai3
{
static void Main(string[] args)
{
int n;
Console.Write("n = ");
n = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Cac so chinh phuong < {0}: ", n);
for (int i = 0; i < n; i++)
{
if ((int)(Math.Sqrt(i)) == Math.Sqrt(i))
{
Console.Write("{0} ", i);
}
}
Console.WriteLine("Cac so nguyen to < {0}: ", n);
if (n >= 0 && n <= 2)
{
Console.WriteLine("khong co so nguyen to nao < {0}", n);
}
else
{
for (int i = 2; i < n; i++)
{
}
}
}
}
}