76.6k views
0 votes
Public class test { public static void main(string[] args) { system.out.print("the grade is "); printgrade(78.5); system.out.print("the grade is "); printgrade(59.5); } public static __________ printgrade(double score) { if (score >= 90.0) { system.out.println('a'); } else if (score >= 80.0) { system.out.println('b'); } else if (score >= 70.0) { system.out.println('c'); } else if (score >= 60.0) { system.out.println('d'); } else { system.out.println('f'); } } }

1 Answer

2 votes
You should be using
void as the function type in the code given.
User DimoMohit
by
8.6k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories