Programming

# FUNCTION roundValue(value, decimalPlaces)' Round the

Customer Question
FUNCTION roundValue(value, decimalPlaces) ' Round...

FUNCTION roundValue(value, decimalPlaces)
' Round the incoming value
value = 0
count = 0;
magnitude = 1
FOR count = 1 TO decimalPlaces
magnitude = magnitude * 10
END FOR
value = (value + 0.5) * magnitude) / magnitude;
return value
END FUNCTION

Technician's Assistant: What programs and versions are you using?

Technician's Assistant: What is your ideal outcome? How can we solve this for you?

I wan to convert this to c programming

Technician's Assistant: Anything else you want the programmer to know before I connect you?

It is the rounded value with 3 decimal places and if value is less than 0 then make it 0 and if value is grater than 2.5 make it 2.5

Submitted: 6 months ago.Category: Programming
Show More
Show Less
Customer reply replied 6 months ago
i just want coding for rounded data with 3 decimal places and if value is less than 0 then make it 0 and if value is grater than 2.5 make it 2.5
9/11/2017
Programmer: LogicPro, Computer Software Engineer replied 6 months ago
LogicPro, Computer Software Engineer
Category: Programming
Satisfied Customers: 13,381
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
Verified
Hi
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

• Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
• Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

## What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

## Meet the Experts:

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

Computer Software Engineer

13,381 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

Software Engineer

800 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Are you GOOGLE. I must confess i do not know the next steps:
I Created a new website : SWINGUIDE.NET and paid to have it Trademark. I now want to use it to sell a product … read more
Suhasini Velu
Bachelor of Engineering
217 satisfied customers
I have a Workbook with 9 Sheets Each Sheet has 4 columns of
I have a Workbook with 9 Sheets Each Sheet has 4 columns of data: Column A: Login (Time Stamp of User login) Column B: User (Name) Column C: Team (Department Name) Column D: Week (Week Name ie. Week 1… read more
MBA
I need help with an IF statement. The IF statement needs to
I need help with an IF statement. The IF statement needs to search for a "Match", then if it matches it will sum up the total costs in another column. … read more
The-PC-Guy
Software Engineer
Bachelor's Degree
800 satisfied customers
Jan: we have an 5-6 year old Version of the laser shot
Jan : we have an 5-6 year old Version of the laser shot Challenge shooting simulator, but sorry to say, we only find the disc and cannot get any acces to it ! the disc number is ***** and we need a ke… read more
Jinsmn
Diplom
1,260 satisfied customers
Jason Jones
AAS Information Technology
6,322 satisfied customers
I am trying to use Excel to log addresses. I eventually want
I am trying to use Excel to log addresses. I eventually want tolearn to address labels. … read more
The-PC-Guy
Software Engineer
Bachelor's Degree
800 satisfied customers
I need an excel expert. Get me someone for 2016 excel
I need an excel expert JA: When did you last update Excel? Customer: get me someone for 2016 excel JA: Anything else you want the Microsoft Office Expert to know before I connect you? Customer: no… read more
Jason Jones
AAS Information Technology
6,322 satisfied customers
I have a list of check numbers for example 100 to 200.I have
I have a list of check numbers for example 100 to 200.I have to export these to the bank. how can I tell that let's say #175 is not in the list without going through the list one by one? … read more
The-PC-Guy
Software Engineer
Bachelor's Degree
800 satisfied customers
Suppose that you are required to write an application to
Suppose that you are required to write an application to model interns and supervisors in a company. 1- Define an abstract superclass called Staff to store two properties as: String name; String addre… read more
LogicPro
Computer Software Engineer
13,381 satisfied customers
Jason Jones
AAS Information Technology
6,322 satisfied customers
I switched my domain from ipage to squarespace and now I
I switched my domain from ipage to squarespace and now I can't log into wordpress to retrieve my content … read more
Senior Microsoft Systems Consultant
Bachelor\u0027s Degree
78 satisfied customers
I need to find an expert who can transfer my backed up
Hello, I need to find an expert who can transfer my backed up Wordpress files in ipage to my new domain in Squarespace… read more
George Sibiya
PhD
234 satisfied customers
For the Crypto system, Reduced DES (R-DES) Protocol, write
For the Crypto system, Reduced DES (R-DES) Protocol, write code in python, C#, C, C++, or Java to develop the following functions:- Key Scheduler - input is 12-bit string, output are three 4-bit round… read more
Ingo U
Master\u0027s Degree
358 satisfied customers
Can someone explain what the Unix 2038 problem is? When was
Can someone explain what the Unix 2038 problem is? When was the epic for UNIX? Is it possible to solve the problem by changing to 64 bit unsigned numbers?… read more
Russell H.
Computer Technology Consultant
784 satisfied customers
I had a blog 4 years ago on World Press but hosted on a
I had a blog 4 years ago on World Press but hosted on a server that is no longer in existence. I have tried to retrieve the content and have only been able to access the photo's, not any text??? Please HELP??!! Live A Little Now.com I have so much content and spent so much time on this over 4 years I really hope you can help. cell(###) ###-####… read more
MBA
Can you help me quick on an excel formula. Im using google
I'm trying to transfer a Team name from one sheet to another from a range of 4 teams. after another column determines the ranking. … read more
The-PC-Guy
Software Engineer
Bachelor's Degree
800 satisfied customers
I need help with making macro. I need help in making a
I want to put a logo on the back of birthday ccard with one step … read more
George Sibiya
PhD
234 satisfied customers
Need help with SQL Database Transaction Log Restores. We are
Need help with SQL Database Transaction Log Restores … read more
Pete
Engineer
Bachelor\u0027s Degree
1,126 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less