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

  • Home
  • SEARCH
  • 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 8668431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:12:44+00:00 2026-06-12T18:12:44+00:00

I am programming a calculator, and I have come across a problem. The programming

  • 0

I am programming a calculator, and I have come across a problem. The programming and the mathematics that the programming is based on do not match up. I’ll provide the code below.

    function calculate() {

  console.log(1);
  var activity = $("#txtActivity").val();

  var days = parseInt( $("#txtDays").val(), 10);
  var hours = parseInt( $("#txtHours").val(), 10);
  var minutes = parseInt( $("txtMinutes").val(), 10);
  var seconds = parseInt( $("txtSeconds").val(), 10);

  var MoneyMadeDuringActivity = (days * 21464) + (hours * 2683) + (minutes * 4472) + (seconds * 0.74);



  $("#CalcOutput").html("In the time it takes me to " + activity + ",<br />Barack Obama makes $" + MoneyMadeDuringActivity);

}

  $("#btnCalculate").click(function() {
    calculate();
  });

The consists of 4 html textboxes which each require integer input. The code produces the following output:

*In the time it takes me to Enter something here, Barack Obama makes $MoneyMadeDuringActivity *

I tested this code by simply entering 1 in each textbox. It should be $24,192.46, but instead I’m getting $28,619.74. What am I doing wrong? Please help!

  • 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-12T18:12:45+00:00Added an answer on June 12, 2026 at 6:12 pm

    You missed a decimal point in the minutes multiplier. It looks like it should be 44.72, not 4472.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to programming a triangle-calculator, that can calculate from three given values all
I'm programming a Android Calculator. I have all my code, but when use the
Programming language: Java Ok, so I want to have a BufferedImage that keeps rotating
I have a C# snippet code about sprite collision in C# game programming, hope
I'm currently programming an app that deals with line graphs. I have three dots
I want to develop a calculator in C#. I have been programming Perl a
I am creating a graphing calculator in Java as a project for my programming
Programming has come a long way. I am still relatively young (first Computer: C64),
Programming language books usually explain that value types are created on the stack, and
I'm currently programming a calculator which is divided into two sections. The first section

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.