81272024-01-12 14:09:54Boti010Oszthatóság 17-tel (60 pont)cpp17Forditási hiba
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _17_tel_oszthatóság
{
    class Program
    {
        static void Main(string[] args)
        {
            string q = Console.ReadLine();
            int n = int.Parse(q);
            int m = 0;
            if (n % 17 == 0)
            {
                Console.WriteLine("IGEN");
            }
            else
            {
                Console.WriteLine("NEM");
            }
            while (n > 9)
            {
                m = n % 10;
                n = n / 10;
                n = n - (m * 5);
                if (n < 0) break;
                Console.Write(n + " ");
            }
            Console.ReadKey();
            
        }
    }
}
Forditási hiba
exit status 1
main.cpp:1:4: error: expected nested-name-specifier before 'System'
    1 | using System;
      |    ^~~~~~
main.cpp:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
main.cpp:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
main.cpp:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
main.cpp:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
main.cpp:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
main.cpp:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
main.cpp:35:6: error: expected ';' after class definition
   35 |     }
      |      ^
      |      ;
main.cpp: In static memb...