Reputation: 63
Hi I am going back through C programming exercises and in this particular program I get an expected primary-expression before '<' token at Line 8 (The While loop). Would appreciate some clarification on what I would need to fix and the reasoning behind it. Here is the code and thank you so much!
#include <stdio.h>
#include <iostream>
using namespace std;
int main(){
int number, i=8;
cout <<"Please enter all numbers from 8-23\n";
cout <<"Start Now: ";
while (i=<23){
cin>>number;
cout<<"Next: ";
if (number!=i){
cout<<"That was the wrong, Please enter: "<<i<<endl;
}
else
i++;
}
cout<<"Congratulations!!\n";
return 0;
}
Upvotes: 1
Views: 1282