Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

1) Predefined and Value Functions Program - Write a program that contains four value functions. One function should input an integer and return the absolute value of the integer. The second function...

1 answer below »

1)Predefined and Value Functions Program- Write a program that contains four value functions.

  • One function should input an integer and return the absolute value of the integer.
  • The second function should input a double and return the absolute value of the double.
  • The third function should input a letter and return the upper case version of the letter.
  • The fourth function should input a letter and return the lower case version of the letter.

The main function should call all four functions and should display the values returned with appropriate labels.

Answered Same Day Nov 02, 2021

Solution

Neha answered on Nov 10 2021
150 Votes
/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************
#include #include #include #include #include using namespace std;
const double MIN_GRADE = 0.0, MAX_GRADE = 100.00;
const int NUM_GRADES = 4;
const string SENTINEL = "XX";
string input_filename();
double get_grade(int count);
double get_average();
void display_file(const string filename);
ool input_names(string& f_name , string& l_name);
ool create_file(string& file_name);
int main()
{
string file_name;
file_name = input_filename();
create_file(file_name);
display_file(file_name);
return 0;
}
string input_filename()
{
string file_name;

Get file name
cout
"\nEnter file name: ";
getline(cin, file_name);
return file_name;
}
double...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here