asked 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.
answered
User DimoMohit
by
8.6k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.