Language: C++

#include <stdio.h>

int
main()
{
	for (;;)
	{
		int m, f, r;
		scanf("%d %d %d", &m, &f, &r);

		if (m == -1 && f == -1 & r == -1)
			break;

		if (m == -1 || f == -1)        puts('F');
		else if (m+f >= 80)            puts('A');
		else if (m+f >= 65)            puts('B');
		else if (m+f >= 50)            puts('C');
		else if (m+f >= 30 && r >= 50) puts('C');
		else if (m+f >= 30)            puts('D');
		else                           puts("F");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |                 if (m == -1 || f == -1)        puts('F');
      |                                                     ^~~
      |                                                     |
      |                                                     char
In file included from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:15:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |                 else if (m+f >= 80)            puts('A');
      |                                                     ^~~
      |                                                     |
      |                                                     char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:16:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |                 else if (m+f >= 65)            puts('B');
      |                                                     ^~~
      |                                                     |
      |                                                     char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:17:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 else if (m+f >= 50)            puts('C');
      |                                                     ^~~
      |                                                     |
      |                                                     char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:18:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   18 |                 else if (m+f >= 30 && r >= 50) puts('C');
      |                                                     ^~~
      |                                                     |
      |                                                     char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:19:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   19 |                 else if (m+f >= 30)            puts('D');
      |                                                     ^~~
      |                                                     |
      |                                                     char
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~