+ 2
Point out the error in the following program.
int main() { cout<<"Enter variable"; cin>>var sqrs = var *var cout<<"The square is"<<sqrs;
4 Respostas
+ 3
semicolons missing
int var also missing
int main()
{
int var,sqrs;
cout<<"Enter variable";
cin>>var;
sqrs = var *var;
cout<<"The square is"<<sqrs;
return 0;
}
+ 2
- Implicit language C++
- incomplete code ( at least a return statement and a closing bracket )
- no declaration of variables
- ...
+ 1
@Megatron:
You forgot too a semi-colon ( sqrs = var *var ) ;)
0
oops!!!!
sorry.