Thirukkural is a popular literary work in Tamil. It consists of 1330 verses, each verse having 2 lines. These verses are grouped into 133 chapters, each chapter having 10 verses. Suppose these verses are written in a text file consisting of 2660 lines. Give a line number from 1 to 2660, you must find the chapter number (1 to 133), verse number (1 to 10) and the line number ( 1 or 2 ). Write a program to implement the above scenario.

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

Thirukkural is a popular literary work in Tamil. It consists of 1330 verses, each verse having 2 lines. These verses are grouped into 133 chapters, each chapter having 10 verses. Suppose these verses are written in a text file consisting of 2660 lines. Give a line number from 1 to 2660, you must find the chapter number (1 to 133), verse number (1 to 10) and the line number ( 1 or 2 ). Write a program to implement the above scenario.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

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