i wabt to know my mistakes

whats wrong with my cin nd cout lines




#include <iostream>
void main ()
{
int a,b,c,d,e;
cout<<"Enter The Students Subjects \n Enter the First Subject";
cin>>a;
cout<<"\n Enter The Second Subject";
cin>>b;
cout<<"\n Enter The Third Subject";
cin>>c;
cout<<"\n Enter The Fourth Subject";
cin>>d;
e=(a+b+c+d)/4;
cout<<"\n The Mean Grade"<<e;
}
You forgot to put std:: in front of cout and cin.
1. Either use std::cout and std::cin or type using namespace std just under #include .
2. Change the book / tutorial you use to something modern. The presented code uses obsolete standards, so similar mistakes will pile up. I recommend http://www.learncpp.com/
thx for you two
Topic archived. No new replies allowed.