- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
'...
        Dim l0 As New List(Of Integer)
        Dim num = Convert.ToInt32(Console.ReadLine)
        For i = 1 To num Step 1
            Dim nn, nm As Double
            nn = num / i
            nm = Convert.ToInt32(num / i)
            If nn = nm Then
                l0.Add(i)
            End If
        Next
        If l0.Count = 2 Then
            Console.WriteLine("Number {0} is simply.", num)
        Else
            Console.WriteLine("Number {0} is not simply.", num)
        End If
        Console.ReadKey()
'...
 Follow us!
 Follow us!
Комментарии (3) RSS
Добавить комментарий