Question: Topic: Computer Science | C++ Programming Write a C++ Program that reads in 2 integers and then outputs their sum, product, remainder and average. A
Topic: Computer Science | C++ Programming Write a C++ Program that reads in 2 integers and then outputs their sum, product, remainder and average. A sample output of the program as follows:- Enter the first number:- 20 Enter the second number:- 10 20 + 10 = 30 20 * 10 = 200 (20 + 10)/2 = 15 20 % 10 = 0
To input 2 number to output results of sum, difference, product, quotient, remainder input 2 numbers output results*/
#include
void ReadNumbers(int, int);
int CalculateSum(int, int);
double CalculateAverage(int, int);
int CalcullateRemainder(int, int);
using namespace std;
int main() { int num1, num2;
/* Read the input from the user and store in num1 and num2*/
cout << "Enter the first number :- "; cin >> num1;
cout << "Enter the second number :- "; cin >> num2;
int ReadNumbers(int&, int&); int calculateSum(int&, int&);
double CalculateAverage(int&, int&);
int Calcullteremainder(int, int);
cout << num1 << " + " << num2 << " = " << num1 + num2 << endl; /*Calculate sum by num1+num2 */
cout << num1 << " * " << num2 << " = " << num1 * num2 << endl; /*Calculate product by num1*num2 */
cout << "(" << num1 << " + " << num2 << ")/2 = " << (float)(num1 + num2) / 2 << endl; /*Calculate average by (num1+num2)/2 */
cout << num1 << " % " << num2 << " = " << num1 % num2 << endl; /*Calculate remainder by num1%num2 */ return 0; /*return from main function */
}
Rewrite the program you wrote in Problem 1,
this time make the StudentRecord type a class type rather than a struct. The student record class should hav member variables for all input datadescribed in Problem 1 and a member variable for the student's weighted average numeric score for the entire course as well as a member variable for the student's final letter grade. Make all member variables Private. Include member functions for each of the following member functions to set each of the member variables to values given as an argument(s) to the function, member functions to retrieve the data from each of the member variables, a void function that calculates the student's weighted average numeric score for the entire course and sets the corresponding member variable and a void function that calculates the student's final letter grade and sets the corresponding member variable. Please I don't understand the problem!
Please write this code in c++! Help me Please!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
