import java.io.*;
class simple_divesible_by_15
{
public static void main(String args[])
{
try
{
int no;
DataInputStream cin=new DataInputStream(System.in);
System.out.println("Enter nuber to check it possitive or negative");
no=Integer.parseInt(cin.readLine());
if(no%15==0)
{
System.out.println(no+" is divisible by 15");
}
else
{
System.out.println(no+" is not divisible by 15");
}
}
catch(Exception e)
{
System.out.println("Wrong data");
}
}
}
class simple_divesible_by_15
{
public static void main(String args[])
{
try
{
int no;
DataInputStream cin=new DataInputStream(System.in);
System.out.println("Enter nuber to check it possitive or negative");
no=Integer.parseInt(cin.readLine());
if(no%15==0)
{
System.out.println(no+" is divisible by 15");
}
else
{
System.out.println(no+" is not divisible by 15");
}
}
catch(Exception e)
{
System.out.println("Wrong data");
}
}
}
No comments:
Post a Comment