Enter an integer number from console. Save it in variable vw. Check if this number is divisible by 7 and display message differently: “the {number} is divisible by 7” or “the {number}is not divisible by 7” (replace {number} with real value)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
icon
Related questions
icon
Concept explainers
Question

in java eclipse ide 

  1. Enter an integer number from console. Save it in variable vw. Check if this number is divisible by 7 and display message differently: “the {number} is divisible by 7” or “the {number}is not divisible by 7” (replace {number} with real value)
Expert Solution
Introduction

Use a Scanner class to read input from console and also use modulus operator to check the remainder on division

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT