Language: C++

using namespace std;


int main()
{
	int t, k, s;
	int n = 0;

	while (1)
	{
		cin >> t >> k >> s;
		if (t == -1 && k == -1 && s == -1)
			break;
		if ((t == -1 || k == -1) || (t + k < 30))
			cout << 'F\n';
		else if (t + k >= 80)
			cout << 'A\n';
		else if (t + k < 80 && t + k >= 65)
			cout << 'B\n';
		else if (t + k < 65 && t + k >= 50)
			cout << 'C\n';
		else if ((t + k < 50 && t + k >= 30) && s < 50)
			cout << 'D\n';
		else
			cout << 'C\n';
	}
}

Compiler output:
a.cc:15:33: warning: multi-character character constant [-Wmultichar]
   15 |                         cout << 'F\n';
      |                                 ^~~~~
a.cc:17:33: warning: multi-character character constant [-Wmultichar]
   17 |                         cout << 'A\n';
      |                                 ^~~~~
a.cc:19:33: warning: multi-character character constant [-Wmultichar]
   19 |                         cout << 'B\n';
      |                                 ^~~~~
a.cc:21:33: warning: multi-character character constant [-Wmultichar]
   21 |                         cout << 'C\n';
      |                                 ^~~~~
a.cc:23:33: warning: multi-character character constant [-Wmultichar]
   23 |                         cout << 'D\n';
      |                                 ^~~~~
a.cc:25:33: warning: multi-character character constant [-Wmultichar]
   25 |                         cout << 'C\n';
      |                                 ^~~~~
a.cc: In function 'int main()':
a.cc:11:17: error: 'cin' was not declared in this scope
   11 |                 cin >> t >> k >> s;
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:15:25: error: 'cout' was not declared in this scope
   15 |                         cout << 'F\n';
      |                         ^~~~
a.cc:15:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << 'A\n';
      |                         ^~~~
a.cc:17:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << 'B\n';
      |                         ^~~~
a.cc:19:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:25: error: 'cout' was not declared in this scope
   21 |                         cout << 'C\n';
      |                         ^~~~
a.cc:21:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:25: error: 'cout' was not declared in this scope
   23 |                         cout << 'D\n';
      |                         ^~~~
a.cc:23:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:25: error: 'cout' was not declared in this scope
   25 |                         cout << 'C\n';
      |                         ^~~~
a.cc:25:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'