Correct Following Code Include Int Main Void Default 0 Int Counter 0 Counter 999 Char X St Q37216522

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.