Write a C++ program that computes a student\'s grade for an assignment as a percentage given the student\'s score and the total points. The final score should be rounded up to the nearest whole value using the ceil function in the header file. You should also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by a space In addition, you should print to the console \"Excellent\" if the grade is greater than 90. \"Well Done\" if the grade is greater than 80. \"Good\" if the grade is greater than 70. \"Need improvement\" if the grade greater than or equal to 60. and \"Fail\" if the grade is less than 50. ROT 13 (rotate by 13 places) is a simple letter substitution cipher that is an instance of Caesar cipher developed in ancient Rome and used by Julius Caesar who used it in his private correspondence. ROTI3 replaces a letter with the letter 13 letters after it in the alphabet The following table demonstrates the translation in ROT 13: Thus, the translation of the word JULIUS using ROTI3 would be WHYVHF. Write a C+- program that inputs a letter and outputs the corresponding letter using the ROT 13 encoding scheme above. Your output should look like G ^ T. Use functional decomposition to write a C++ program that determines the median of three input numbers. The median is the middle number when the three numbers are arranged in order by sire. However, the user can input the values in any order, so your program must determine which value is between the other two. For example, if the user enters 41.52 27.1X 96.03 Then the program would output The median of 41.52. 27.1X. and 96.03 b 41.52. Once you have the three-number case working, extend the program to handle five numbers. Be sure to use proper formatting and appropriate comments in your code. The output should be labeled clearly and formatted neatly.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
using namespace std;
void calculate_grade(){
string filename;
cin >> filename;
ifstream in(filename.c_str() );
int score, totalPoints;
in >> score >> totalPoints;
double grade = (score*100.0)/totalPoints;
cout << fixed << setprecision(5);
cout << \"Grade: \" << grade << endl;
int fgrade = ceil( grade );
if( fgrade > 90 ){ cout << \"Excellent\" << endl; }
else if( fgrade > 80 ){ cout << \"Well Done\" << endl; }
else if( fgrade > 70 ){ cout << \"Good\" << endl; }
else if( fgrade >= 60 ){ cout << \"Need improvement\" << endl; }
else{ cout << \"Fail\" << endl; }
}
void rot13( char inp ){
if( inp < \'N\' ){ cout << inp << \" -> \" << char(inp + 13) << endl; }
else{ cout << inp << \" -> \" << char(inp - 13) << endl; }
}
void median(){
int totalNumbers = 3;
double arr[ totalNumbers ];
for(int i =0; i < totalNumbers; i++){
cin >> arr[i];
}
cout << \"The median of \";
for(int i =0; i < totalNumbers- 1; i++){
cout << arr[i] << \", \"; }
cout << \"and \" << arr[ totalNumbers - 1 ] << \" is \";
sort( arr, arr+ totalNumbers );
cout << arr[ totalNumbers/2 ] << \".\" << endl;
}
int main(){
//calculate_grade();
rot13( \'G\' );
rot13( \'A\' );
rot13( \'K\' );
rot13( \'W\' );
rot13( \'Q\' );
median();
}