Computer Science, asked by agustdbts4731, 6 months ago

Write a program to input the grade of a student. If the grade is “A”. Display “Well done” otherwise display “Work hard”.​

Answers

Answered by manuprajapati519
1

import java.util.Scanner;

public class main

{

public static void main(String args[])

{

Scanner in = new Scanner(System.in);

char a=in.nextChar();

System.out.pritln("Enter your Grade");

if(a=='A')

{

System.out.println("Well done");

}

else

{

System.out.println("Work hard");

}

}

}

Similar questions