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 6945697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:28:11+00:00 2026-05-27T13:28:11+00:00

I am using FLEX version 3.0 I want to calculate the total working hours.

  • 0

I am using FLEX version 3.0
I want to calculate the total working hours. I am giving you the details and what i have done in it.

var a:Number = 2.00;
            var b:Number = 2.00;
            var c:Number = 1.45;
            var d:Number = 1.30;

            var total:Number = a+b+c+d;
            var totalmin:int = total;
            var temp:Number = total - totalmin;
            var tem2:Number = 0.60 - temp; 
            var workhour:Number = 0;

            while(total >= 0)
            {
                workhour += 1;
                total -= 1.00;  
            }

            var tot:Number = workhour + tem2;

            txtTotal.text = tot.toString();

I want result 7.15 not 6.75.
currently i am getting 6.85… please Help to solve this issue.

thanks in advance.

  • 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-05-27T13:28:11+00:00Added an answer on May 27, 2026 at 1:28 pm

    I have worked a lot on this one and find one of the interesting questions…..
    and i have found the correct answer for that.. Keep posting that interesting questions.

    here is the code.

    var a:Number = 2.23;
    var b:Number = 2.36;
    var c:Number = 1.18;
    var d:Number = 1.13;
    
    var totalHours = 0.0;
    
    var inta:int = a;
    var numa:Number = a - inta;
    var intb:int = b;
    var numb:Number = b - intb;
    var intc:int = c;
    var numc:Number = c - intc;
    var intd:int = d;
    var numd:Number = d - intd;
    
    
    var total:int = inta + intb + intc + intd;
    var totalsec:Number = numa + numb + numc + numd;
    var tempsec:int = totalsec * 100; 
    
    var temp:int = tempsec/60;
    
    total += temp;
    
    var sec:Number = tempsec - (temp*60);
    
    sec = sec/100;
    
    totalHours = total + sec;
    
    txtTotal.text = totalHours.toString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Flex 3.6 and ZEND AMF version 1.11 I have an array that
I'm using Flash Builder 4 (the version after Flex Builder 3, so very similar
Using Flex 3, I have a Button which is skinned using PNGs specified in
Using Flex and Bison, I have a grammar specification for a boolean query language,
Using Flex 3.2, I have a object which extends a TitleWindow. In this TitleWindow
I have implemented some utility classes in Flex that I want to use in
I'm embeding a flex application into a web page using the most recent version
I have flex application consisting of several modules which is configured using maven. I'm
I am working on a full screen kiosk application in Flex 4/Air 2 using
I'm using flex (lexical analyzer, not Adobe Flex) on a project. However, I want

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.