Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Define a structure of student class:
Write a program to define a structure of student record in C.
class student
{
char name[20];
int roll_no;
int marks[2];
float average;
public:
void input();
void output();
float calci();
friend void rank(student ,student );
};
void student:: input()
cout << "enter the name ,rollno,marks of 2 subjects\n";
cin>> name >> roll_no >>marks[0]>>marks[1];
}
void student :: output()
cout< } float student :: calci() { return average= float(marks[0]+ marks[1]) / 2; } void rank(student a, student b) { if ( a.calci() > b.calci() ) cout << "the student e1 is best\n"; else cout <<"the studentr e2 is best\n"; } void main() { clrscr(); student t[2]; t[0].input(); // t[0].calci(); // t[0].output(); t[1].input(); // t[0].calci(); //t[1].output(); rank(t[0],t[1]); getch(); }
float student :: calci()
return average= float(marks[0]+ marks[1]) / 2;
void rank(student a, student b)
if ( a.calci() > b.calci() )
cout << "the student e1 is best\n";
else
cout <<"the studentr e2 is best\n";
void main()
clrscr();
student t[2];
t[0].input();
// t[0].calci();
// t[0].output();
t[1].input();
//t[1].output();
rank(t[0],t[1]);
getch();
I. COURSE DESCRIPTION Develops a working knowledge of object-oriented concepts in areas of classes, inheritance, data structures, error handling, templates and file processing.
Ravi is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''''{'''' and end with ''''}
i am using mobile phone if i want to communicate via massage but that should be very secret
Academic expert for Genetic Algorithm Project Description: Seeking academic expert for Genetic Algorithm. Skills required are Academic Writing, Algorithm, C++ Programming,
How does placing some code lines between comment symbols help in debugging the code? - Placing comment symbols /* */ around a code separates some code that coder believes might
Reverse a string - C ++ program: Write a program in c to reverse a string. int main() { Stack theStack; String reverse("reverse"); cout
The probabilistic Hough transform uses random sampling instead of an accumulator array. In this approach the number of random samples r, is not specified in the OpenCV call, but is
In this assignment you are required to develop a program that allows the creation, viewing and storage of information about ITECH7603 Students. In order to complete the task you ha
Suppose we use Lists to represent a movie which has a title, cast and year. For example, the following list represents the movie, "Die Hardly", with the cast "Bruce Willing" and "T
how to make a game
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd