Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<conio.h>
- using namespace std;
- int main()
- {
- int n;
- double total=0;
- double avr=0;
- cout<<"How many division students ? "<<endl;
- cin>>n;
- cout<<" Number of students :"<<n<<endl;
- double marks[n];
- cout<<"Write students grades :\n";
- for (int i=0; i<n;i++)
- cin>>marks[i];
- for(int i=0;i<n;i++)
- total=total+marks[i];
- avr=total/n;
- cout<<"Number of students ="<<n<<"\tTotal student Grades = "<<total<<"\tAverage number of students = "<<avr<<"\n\n\n"<<endl;
- if ( avr >9)
- cout<<" Teacher level is EXCELLENT"<<endl;
- else if ( avr >8)
- cout<<" Teacher level is VERY GOOD"<<endl;
- else if ( avr > 6 )
- cout<<" Teacher level is GOOD"<<endl;
- else if ( avr >4)
- cout<<" Teacher level is NOT BAD"<<endl;
- else if ( avr >2 )
- cout<<" Teacher level is BAD"<<endl;
- else {
- cout<<" Teacher level is FAIL"<<endl;
- }
- cout<<"\n\t-Thanks for the program -"<<endl;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement