how to calculate in comp science im not aable to solve this 5+4/3*(5-3)/2
\[5 + \frac43 \times \frac{(5-3)}{2}\]
Use PEDMAS.
simple !! @saifoo.khan take charge!! its u in the show 2 help
Parenthesis, Exponents, Division, Multiplication, Add Subtract.
answer is ???
Calculate it to find out.
answer is: try it
what do you mean by computer science?
6 sahi hai GOOD tnx
5/3 *6 = ? according to PEDMAS is it 9.6?? if not then please explain how to use PEDMAS I hv started C++ since 2 hr
76.6227766
is answer
nooo answer is 6
:-(
i got 5.66666 when rounded off is 6 does that count? haha
dnt know, but the answer for 6.0 * 5/3 is 10.0 and 6 * 5/3 is 10 AND IM CONFUSED at the end!!
6* 5/3 = (6)(5)/3 = 30/3 = 10 that i know
5-3=2 3*2=6 4/6/2=4/3 5+4/3 = 6.33333
but it says 6.0 must be the answer...
6.3 in c++ when returned as an integer is 6
then how 5/3 *6 = 6 , its given in answers
i dont think thats right
r u sure
5/3*6 = 5/18 that is not 6
also 6.0 * 5/3 = 10.0 n 6 * 5/3 = 10 how??
thats why i said its wrong,,, the only way to do it is how i did it
lol because 6*5/3 is 10
what language do you code in?
c++ he said
hey hey when im SOLVING in WINDOWScalclater ans are correct and same as the book :-D :-D
lol i dont know then,,, -.-
Oh c++ hmm do you know the difference between int and float? when you add that decimal point the numbers gets stored as float.
and int only account for the whole numbers.
that point is clear( 10.0 and 10) FLOATING CONSTANT, we represent 10.0 and int constant 10 no fractional or decimals
This may be confusion 5.0/3.0*6.0 but when you have operations at the same level (as are division and multiplication), you evaluate them left to right: e.g. \[ \frac{5}{3} \cdot 6 = 10 \] Here is C code to show the evaluation #include <stdio.h> main() { printf("Hello, World!\n"); printf("%s, %f\n","5.0/3.0*6.0", 5.0/3.0*6.0); } code$ cc hello.c -o hello -lm code$ hello Hello, World! 5.0/3.0*6.0, 10.000000
i got it 5/3 is 1.6666666666667 so 1.666666667 *6 = 10 6.0 * 5/3 = 6.0 **1.66666667 = 10.0 BCZ FLOAT 6 * 5/3 = 10 simply bcz its in int and probably answer in the book is wrong for 5/3 *6 , answer given is 6 but it will be 10 now im sure
DHANYVAAD EVERYONE tnx
If you evaluate integers 5/3*6 then 5/3 -->1 (you lose the remainder) and 1*6=6 #include <stdio.h> main() { printf("Hello, World!\n"); printf("%s, %f\n","5.0/3.0*6.0", 5.0/3.0*6.0); printf("%s, %d\n","5/3*6", 5/3*6); } code$ hello Hello, World! 5.0/3.0*6.0, 10.000000 5/3*6, 6
You say 6.0 * 5/3 is 10.0 <-- notice the 6.0, this causes the expression to be evaluated as a float 5/3 *6 = 6 <--- evaluated as integers
yes i got it
Join our real-time social learning platform and learn together with your friends!