I had this on my study guide for the test this week. How would you code this to make it more simpler? I just wanted to see how you would make simpler so that I know for the test. Also how do tag code? I doubt I did it correctly....
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int score;
cout << "Enter the test score";
cin >> score;
[f] (score >= 0 && score <= 100)
{
To do code tags you surround your code with [ Code ] [ /Code ] (No spaces)
Apart from you should be using else if on the B/C/D/F scores to make it easier to read and optimize it slightly your code is fine. If you want something different you could do something like this.