Correct the following code.
#include <iostream.h>
int main(){
void default = 0;
int counter = 0;
while(counter != -999)
{
char x = ”;
std::cout<<“Please enter character “<<std:endl;
std::cin>>x;
if(int(upper(x)) < 59){
counter++;
}
counter = counter | x;
if(counter > 89 | counter < 98)
return 98;
}
}
}
Answer
#include <iostream>#include <cctype>int main() { int def = 0; int counter = 0; while (counter != -999) { char x = ‘ ‘; std::cout << “Please enter character ” << std::endl; std::cin >> x;
OR
OR