Answered by:
C#

Question
-
concerns Calculator program Division deals with 2/3 (o.666.. but when I try 2/3 in root button it comes up 0.
any advice would be really welcome. jes
Tuesday, March 31, 2015 1:37 PM
Answers
-
Hi,
How do you calculate it? Is it related to App for office?
I think the issue is more related to C#, the reason of that issue is that you are using the integer type, please use float type instead.
For example
float i = 2; float p = 3; float f = i/ p;
Regards
Starain
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Starian chenMicrosoft contingent staff Tuesday, April 14, 2015 8:24 AM
- Marked as answer by Fei XueMicrosoft employee Tuesday, April 14, 2015 9:57 AM
Wednesday, April 1, 2015 2:37 AM
All replies
-
Do you develop an Office App?Tuesday, March 31, 2015 3:03 PM
-
Hi,
How do you calculate it? Is it related to App for office?
I think the issue is more related to C#, the reason of that issue is that you are using the integer type, please use float type instead.
For example
float i = 2; float p = 3; float f = i/ p;
Regards
Starain
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Proposed as answer by Starian chenMicrosoft contingent staff Tuesday, April 14, 2015 8:24 AM
- Marked as answer by Fei XueMicrosoft employee Tuesday, April 14, 2015 9:57 AM
Wednesday, April 1, 2015 2:37 AM -
I think your site is probably to advanced for me. Your answer is obviously absolutely correct. I really appreciate your input. Could I contact with further problems or could you guide me to an appropriate forum for a c# beginner.
Many, many thanks. sully
Wednesday, April 1, 2015 8:05 AM -
Hi,
For the issues of C#, you could post to https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=csharpgeneral.
Regards
Starain
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Wednesday, April 1, 2015 8:08 AM -
Thanks for your advice. I have visited the site you recommended and feel it is a more appropriate site for me.
Hope to reach the standard necessary to come back to your site. Thanks once again. sully.
Thursday, April 2, 2015 8:28 AM