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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:12:54+00:00 2026-06-18T03:12:54+00:00

Is this even possible? i tried to google it but i cant seem to

  • 0

Is this even possible? i tried to google it but i cant seem to find the right answer.

I need to limit the decimal places since the answer will really differ if there is only 3 decimal places than 5, so i was hoping that you could help me with these. i know how to print with 3 decimal places but to declare a variable to only hold 3 decimal places is something i do not know. i could also use some links if you have any.

float sinfa(float num1)
{
    float fc;
    float powers;
    float rad_angle;

    rad_angle = num1 * (PI / 180.0);
    powers = pow(num1,4);
    fc = sin(rad_angle)-powers+1;
    return (fc);
}

float sinfb(float num2)
{
    float fd;
    float powerss;
    float rad_angle1;

    rad_angle1 = num2 * (PI / 180.0);
    powerss = pow(num2,4);
    fd = sin(rad_angle1)-powerss+1;
    return (fd);
}

float tp(float fa,float fb,float num1,float num2)
{
    float p;
    float fm2 = fa*num2;
    float fm1 = fb*num1;
    p = (fm2-fm1)/(fa-fb);
    return (p);
}

float sinp(float p1)
{
    float fop;
    float ppowers;
    float rad_angle2;

    rad_angle2 = p1 * (PI / 180.0);
    ppowers = pow(p1,4);
    fop = sin(rad_angle2)-ppowers+1;
    return (fop);
}

Thank you

  • 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-18T03:12:56+00:00Added an answer on June 18, 2026 at 3:12 am

    It can be done!

    int intVal = 1.234567 * 1000;          // result: 1234
    float floatVal = (float)intVal / 1000; // result: 1.234
    

    The trick is to:

    1. Move the required number of digits to the left-hand side of the decimal place.
    2. Truncate all the digits on the right-hand side of the decimal place.
    3. Move the required number of digits back to the right-hand side of the decimal place.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure this is even possible but I know if it is, the
I don't even know if this is even possible, but I thought I'd ask.
so I don't know if this is even possible, but one of my close
I'm not sure if this is even possible, but is there a way to
First of all I'm not sure this is even possible, however I need to
I am not sure if this is even possible but I am trying to
I searched for this here and on google and surprisingly couldn't find an answer.
Is this even possible? I have a key-pair that I already made with GPG
Is this even possible? function foo() { // do stuff } foo.prototype = {
Is this even possible? Basically, I want to turn these two calls to sub

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.