#include <iostream>
#include <ctime>
#include <string>
#include <string.h>
#include <stdio.h>
int main()
{
usingnamespace std;
srand(time(NULL));
shortint iScore;
shortint eScore;
iScore=0;//your score
eScore=0;//opponent score
shortint iType;
shortint eType;
double rundor;//amount of rounds
shortint stensaxpase;
cout<<" *************************\n";
cout<<" * Sten Sax Pase *\n";
cout<<" *************************\n";//"header"
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"Först till: ";//how many rounds?
cin>>rundor;
while (iScore<=rundor && eScore<=rundor);
{
eType = rand() / (RAND_MAX / 3 + 1) + 1;
cout << "Sten sax eller pase?(1=sten,2=sax,3=pase)\n";
cin>>iType;
if (iType == 1)
{
if (eType == 1)
{
cout<< "Lika!";
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 2)
{
cout<< "Du vann rundan!";
iScore=iScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 3)
{
cout<<"Du förlorade rundan...";
eScore=eScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
else
{
cout<<"ERROR!";
}
}
elseif (iType == 2)
{
if (eType == 2)
{
cout<< "Lika!";
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 3)
{
cout<< "Du vann rundan!";
iScore=iScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 1)
{
cout<<"Du förlorade rundan...";
eScore=eScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
else
{
cout<<"ERROR!";
}
}
elseif (iType == 3)
{
if (eType == 3)
{
cout<< "Lika!";
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 1)
{
cout<< "Du vann rundan!";
iScore=iScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
elseif (eType == 2)
{
cout<<"Du förlorade rundan...";
eScore=eScore+1;
cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
}
else
{
cout<<"ERROR!";
}
}
else
{
cout<<"Skriv 1 for sten, 2 för sax eller 3 för pase!";
}
}
cin.ignore();
cin.get();
}
When i thought the code was done,i compiled it said "linking" for a few seconds then done ( i was shocked that i didn't get any errors as i started coding a couple of days ago).
When i pressed ctrl+f10 it said "Project is not compiled" in a pop-up.
Im using dev-c++ if its for any help.
You need patience, sir. It's only about 9 in the morning in the area where the bulk of our regular members live.
Are you sure it's not spitting out any errors? I did a quick search for the issue at hand but couldn't find anything that didn't result in it actually having some errors.
edit: Also, dev-c++ is horribly out dated and you are unlikely to find experienced users here who can actively help you with that IDE.
North America/ South America. I could be wrong though. I was pretty sure the majority of us live In the US and Canada. With like 1 or 2 living in brazil.