Загрузка...

How to fix compilation error?

Thread in C/C++ created by SellerNumbOne Oct 20, 2020. 445 views

  1. SellerNumbOne
    SellerNumbOne Topic starter Oct 20, 2020 МАМA ДУМАEТ ЧТО Я ГДЕ-ТО ВАЙТИ 65 Feb 9, 2019
    Вот такая вот ошибка Compile error: b"/tmp/submission9y8jx4on/ConsoleApplication12.cpp:1:1: fatal error: unknown type name '\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd'\n\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd#include<iostream>\n^\n1 error generated.\n"


    КОД:
    #include<iostream>
    using namespace std;

    int Factorial(int x)
    {
    int sum = 1;
    if (x < 2 && x>-11)
    {
    return 1;
    }
    else if (x > 1 && x < 11)
    {
    for (int i = 2; i <=x; i++)
    {
    sum = sum * i;
    }
    return sum;
    }
    }
    int main()
    {
    int a;
    cin >> a;
    cout << Factorial(a);

    }
     
  2. Лейнер
    Лейнер Oct 20, 2020 あいさつ、私の奴隷、王にお辞儀してください。 168 Apr 20, 2017
    Смотри, тут все очень просто, нажми ctrl a + backspace, должно помочь
     
  3. SellerNumbOne
    SellerNumbOne Topic starter Oct 20, 2020 МАМA ДУМАEТ ЧТО Я ГДЕ-ТО ВАЙТИ 65 Feb 9, 2019
    Проблему уже сам решил, если кто нибудь столкнется с ней то просто поменяйте кодировку на UTF-8 БЕЗ СИГНАТУРЫ
     
  4. renameduser_302881
    renameduser_302881 Oct 21, 2020 Meepo 77 Feb 15, 2018
    SellerNumbOne, а нахуй тебе столько return'ов?))
    Сделай 1, не будь, как пешка goto
     
Top
Loading...