jeudi 16 janvier 2020

it gives me expected identifier before { token

The problem is that I don't know what the problem is. I have tried to look it up, in my opinion everything seem right, but somehow it is not.

#include <iostream>

using namespace std;

int main()
{
    int s,a;
    cin >>a;
    if (a=!0)and(a<=1000000)
        {s=a*(a+1)/2;
        cout <<s;}

    return 0;
}

Aucun commentaire:

Enregistrer un commentaire