Write a complete program that will write a file (named output.txt) that contains the integers from 1 to 100 (both inclusive), each on their own line, except that if the number is divisible by 5 it instead prints fizz and if it is divisible by 7 it prints buzz (and if it is divisible by both it prints fizzbuzz). Don't use an array

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Write a complete program that will write a file (named output.txt) that
contains the integers from 1 to 100 (both inclusive), each on their own line, except
that if the number is divisible by 5 it instead prints fizz and if it is divisible by 7 it
prints buzz (and if it is divisible by both it prints fizzbuzz).

Don't use an array

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Constants and Variables
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