try to compile

well i've tried 2 write my program, but it's ain't working. could u please tell me why it isn't compilating. please halp me!!!!

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int a, b, suma_lyg, suma_nelyg;
cout << "Įveskite skaičių seką" << endl;
cin >> a >> b ;
while (abs (a) % 10 == abs (b) % 100 / 10)
{
if (a % 2 == 0)
suma_lyg = suma_lyg + 1;
else suma_nelyg = suma_nelyg + 1;
a = b ;
cin >> b;

}
cout << "Lyginių ir nelyginių skaičiu skirtumas yra:" << suma_lyg - suma_nelyg << endl;
return 0 ;
}
It would help to know what the compiler says but the problem may be that characters like Į etc are not encoded properly
well it says :
multiple definition of 'main'
first defined here
Id returned 1 exit status
[Biuld Error] [mano.exe] Error 1

thats it...
Last edited on
Are you compiling multiple programs at once, linking to some outdated object file or something similar?
multiple programs
Thank you very much ;) I am the very beginner ;) thank you again ;)
Topic archived. No new replies allowed.