Monday, December 10, 2007

How to define a Mathematic Function

How to define a Mathematic Function

To define a Mathematic Function

typedef unsigned student;

#include

student calculate_student(student class_1, student clas_2);

int main()

{

student class_1_total;

student class_2_total;

student grand_total;

cout << "\nHow student in your First class ? ";

cin >> class_1_total;

cout << "\nHow student in your Second class ";

cin >> class_2_total;

grand_total= calculate_student(class_1_total,class_2_total);

cout << "\nThe There is "<<<">

return 0;

}

student calculate_student(student x, student y)

{

return x + y;

}

Result :


No comments: