Write a program to take input for two integer variables. Assign the value -1 to the variable with higher value using a function.
[Use return by reference ]
Create the classes as per the hierarchy given below. The data members are mentioned along with class name. Include parameterized constructor in all the classes. Input data at run-time for a student, calculate the total marks and percentage and display them.
Student: Name, Roll Number
|
V
Marks: marks in 5 subjects
|
V
Result: total marks, percentage
Create a class employee which stores is name, ID and salary of an employee by user input. The ID should be generated upon the creation of object, starting from 1. Include all the constructors and destructor in the class. Create one object using each of the constructors and display it.
The program should have an array of 12 structures to hold weather data for an entire year. When the program runs, it should ask the user to enter data for each month. The program then should display month-wise min., max. and average temperatures and rainfalls in a table-like format. In addition, it should display average min., average max. and average mean temperature of the entire year. Similarly, it should display average min., average max. and average mean rainfall of the entire year. The following checks should be implemented for valid input. • Temperature range: -70 to +60 C • Rainfall range: 1mm to 25mm • Min. value <= Average value <= Max value
Write a program that uses the following three structures to store the weather data for a particular month:
Write a program to determine the factorial of 4 numbers