Computer Science, asked by parthomsarwade, 1 year ago

write a program in java with the following criteria
class name: moviemagic
void main()
int a
String Movie
rating is 1 to 3. flop
rating is 3 to 5. hit


Answers

Answered by shadmankhan007
5

import java.util.*;

public class moviemagic

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int a;

string movie;

System.out.println("Enter the movie name & rate it between 1 to 5");

a=in.nextInt();

movie=in.nextLine();

if(a>0)&&(a<=3)

{

System.out.println(movie+" is flop");

}

if(a>3)&&(a<=5)

{

System.out.println(movie+"is HIT");

}

else

{

System.out.println("RATING is INVALID");

}

}

}

PlZ run it on computer but before mark my answer as brainiest plz plz


parthomsarwade: i can't mark branliest an u are the only one to answer but the answer is right i checked
parthomsarwade: thanks for your help
shadmankhan007: Okk no problem with it
shadmankhan007: but still if u need any help then remembere me... I'm here...
shadmankhan007: ; )
Answered by gracy55
0

Answer:

Parameters used in First Java Program. Let's see what is the meaning of class, public, static, void, main, String[], System.out.println(). class keyword is used to declare a class in java. ... static is a keyword. If we declare any method as static, it is known as the static method.

Similar questions