Enter today's day numerically: 17
Sorry, not a payday.
Enter today's day numerically: 30
It's payday!
Answers
Answered by
0
Java Program to display output
Explanation:
Java Program to display
import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter today's day numerically : "); //input date in numeric
int n= sc.nextInt();
if (n==30)
System.out.print("Its payday!");
else
System.out.print("Sorry, not a payday.");
}
}
Output 1
Enter today's day numerically : 30 Its payday!
Output 2
Enter today's day numerically : 12 Sorry, not a payday.
Output 3
Enter today's day numerically : 17 Sorry, not a payday.
Similar questions