Plz write any one of the program(Java)...
Attachments:
tanya2601:
okay..
Answers
Answered by
1
Program number 1:
import java.util.*;
class Dcoder
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
System.out.println("Enter the number");
int num = in.nextInt();
if(num>=2 && num<=5)
System.out.println("Season is SUMMER");
else if(num<=9 && num>=6)
System.out.println("Season is RAINY");
else if(num==1 || num>=10 && num<=12);
System.out.println("Season is WINTER");
if(num>12 && num<1)
System.out.println("Invalid Value entered");
}
}
import java.util.*;
class Dcoder
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
System.out.println("Enter the number");
int num = in.nextInt();
if(num>=2 && num<=5)
System.out.println("Season is SUMMER");
else if(num<=9 && num>=6)
System.out.println("Season is RAINY");
else if(num==1 || num>=10 && num<=12);
System.out.println("Season is WINTER");
if(num>12 && num<1)
System.out.println("Invalid Value entered");
}
}
Similar questions