سلام شباب
اسف على السؤال السخيف لاني شويي مبتدأ في #C
كييف احول double 0.25269
الى 0.2
سلام شباب
اسف على السؤال السخيف لاني شويي مبتدأ في #C
كييف احول double 0.25269
الى 0.2
لكي يكون رقم ذو خانة واحدة
One digit number
سيكون 0.3
Console.WriteLine ( " My Number is {0:0.0}", myDoubleNumber);
which will print to screen 0.3
لكي تكون 0.25
Console.WriteLine ( " My Number is {0:f}", myDoubleNumber);
هذه طريقه اخرى للتقريب
اما ما يتعلق بالناتج فسوف يظهر نفس الناتج السابق و الذي هو 0.3
double number; number=0.25269; number=Math.Round (number,1);
الرقم 1 يدل على ان مقدار التقريب هو عدد واحد و يمكنك تغييره
If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
شكرااا شباب على المساعدة :)
هذا الموضوع مغلق.