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();
decodes the sending smuggler string from the number format into plain text
Question 1 / 1 You have an N x N chessboard and you wish to place N kings on it. Each row and column should contain exactly one king, and no two kings should attack each other (two
Hello, I would like to know if you can help in C programs that work on android.
What is T y pe C a s t Op er a t o r : T h e f l o a t c a n b e c o n v e r t e d t o i n t e g e r v a l u
give a program to compile
Array of Objects: The objects can be declared just like a structure or even a primary data type. Array of objects may be required to work with large set of data. When the da
Selecting Array Elements Implement the following C++ code in assembly language, using the block-structured .IF and .WHILE directives. Assume that all variables are 32-bit signed in
Purpose This assignment is an exercise in implementing the queue ADT using a singly-linked list. This assignment also introduces the concept of templates. Assignment Th
lcm program.
2. Write C++ code for calculating the time table
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd