I have completed my program but it has this Error E2379 CokeRewardCodes.cpp 18: Statement missing ; in function main()
where is the error in this code ?
Code:
#include <iostream>
#include<string>
using namespace std;
int main()
{
string i;
int length=0;
cout<< "please enter a serial number of 12 characters:";
cin >> i;
length=i.length();
if (length!=12 )
cout << "The code you have entered cannot be processed because the code must be contained of 12 characters exactly";
else (length == 12)
cout << " that's correct code";
return 0;
}