Computer Science, asked by 786sohailakhter, 2 months ago

Write a java program to input a no and check whether the no divisible by 7 or not.​

Answers

Answered by pmaithili2704
1

This program is compiled and executed through BlueJ.

Attachments:
Answered by atrs7391
0

package Brainly_Answers;

import java.util.Scanner;

class test

{

   public static void main (String[]args)

   {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter number: ");

       double n = sc.nextDouble();

       if (n%7==0) {

           System.out.println("Number is divisible by 7. ");

       }

       else {

           System.out.println("Number is not divisible by 7. ");

       }

   }

}

Similar questions