Computer Science, asked by srinidhitr2005, 7 months ago

Write a programme in java to do the following:- - input the name of the student and the marks scored in computer science. - If the marks scored in computer science is greater than 70 then display "Excellent" otherwise display "can do better next time". Thank you!

Answers

Answered by Regina16
1

Answer:

import java.util.Scanner;  

public class marks {  

public static void main(String[] args) {  

Scanner Sc=new Scanner(System.in);  

System.out.println (" Enter your name ");  

String str= Sc.nextLine();  

int marks;  

System.out.println (" Enter the marks scored in computer science");  

marks= Sc.nextInt();

if (marks>=70)  

   System.out.println ("Excellent");  

else

   System.out.println ("Can do better next time");  

}

}

Explanation:

hope this helps  :)

Similar questions