| Cfare ju duhet te dini? |
|
#1
| ||||
| ||||
| #include<iostream.h> #include<conio.h> class student { private: int rno,mark[10],total; char *name; char grade; float avg; const static int tot, max; static int count; public: student() { rno=0; name=new char[10]; total=0; avg=0; grade='-'; } static void counting(); void getdata(); void result(); void display(); }; int student::count=0; const int student::tot=6; const int student::max=100; void student::counting() { count++; } void student::getdata() { int i; rno=count; cout<<"\n RollNo:"<<rno<<endl; cout<<"Name:"<<name<<endl; for(i=0;i<tot;i++) { cout<<"\nMark:"<<i++<<"\t"; cin>>mark[i]; if(mark[i]>100) { cout<<"\nInvalid mark..."<<endl; i--; }}} void student:: result() { int i; for(i=0;i<tot;i++) total=mark[i]++; for(i=0;i<tot;i++) if(mark[i]<36) return; avg=total/tot; if (avg>=80) grade='A'; else if(avg>=60) grade='B'; else grade='C'; } void student::display() { int i; cout<<endl<<rno<<"\t"<<n
__________________ Powered by Yahoo! Answers |
![]() |
| Bookmarks |
| Tags |
| pls, programm, work |
| Alternativa Teme | |
| Vleresojeni kete Teme | |
|
|
Tema te ngjashme | ||||
| Tema | Filluesi i temes | Forumi | Pergjigje | Postimi i Fundit |
| Tekste kengesh boterore | Qershija | Muzika | 45 | 25-05-2008 16:55 |
| if you have to choices to work in a new company or work in a big and old company | Real | Business & Finance | 1 | 26-12-2007 14:27 |
| Does anybody know how i would go about getting work on a cruise ship? | dingalo | Travel & History | 0 | 06-08-2007 09:41 |
| Work or not work? | lforbes2_1999 | Pregnancy & Parenting | 1 | 03-08-2007 17:40 |
| am i in the right?, phone politics in work.? | absolved lemon | Society & Culture | 1 | 03-08-2007 12:57 |