Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:19:13+00:00 2026-06-07T17:19:13+00:00

If I have given a certain lines per page and have to find how

  • 0

If I have given a certain lines per page and have to find how many pages have been used. if I divide it, still I don’t get 2 pages :

   Dim lines As Integer = 68
    Dim lines_per_page As Integer = 65
    Dim pages_used As Integer
    Pages_used =  lines_per_page / lines 

Can you help please.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:19:14+00:00Added an answer on June 7, 2026 at 5:19 pm

    You’re doing your division backwards. You must divide total lines by lines-per-page. See how the terms cancel in this way:

    x pages = (y lines/1 page) / (z lines) << yeilds 1/pages (wrong!)

    x pages = (z lines) / (y lines/1 page) = (z lines) * (1 page / y lines) << correct!

    Also note that you need to perform double division, not integer division, then round the resulting value up since a partial page must be rounded to a full page.

    Dim lines As Integer = 68 
    Dim lines_per_page As Double = 65 
    Dim pages_used As Integer 
    pages_used = CType(Math.Ceiling(lines / lines_per_page), Integer)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My boss have given me assignment to find how a web based application developed
I have been given a task to crawl / parse and index available books
I have a function that returns a hash, given certain parameters: build_message = function(from,
I want to append something at the end of a certain line(have some given
I have a certain set of assertions that I give to z3 which are
I have given a default value 2.5 for a textbox called diff_Box and then
I have given 100% width to input box to fix to the browser width
i have given required permission : <uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE /> hard-coded the path as /sdcard/filename
I have given bg image for radio button. It is working in chrome but
I have given client's queue connection details to connect to it using Camel. While

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.