identify errors in the following c++ program
#include<iostream>
void main()
{
int i=0;
i=i+1;
cout <<i << " " ;
/*comment \*//i=i+1;
cout <<i;
}
If you try to run this program the compiler will display the following error messages:
Correct code:
#include<iostream> using namespace std; // for cout void main(){ int i=0; i=i+1; cout <<i << " "; /*comment */ i=i+1; cout <<i; }
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments