+ 2

How do I write a code to calculate average of three numbers

9th Mar 2022, 5:35 PM
Kekusina
Kekusina - avatar
3 Answers
+ 1
int n1=1; int n2=2; int n3=3; int avg=(n1+n2+n3)/3; System.out.println(avg);
9th Mar 2022, 5:40 PM
Davinder Kumar
Davinder Kumar - avatar
+ 6
(a + b + c) / 3
9th Mar 2022, 5:39 PM
A͢J
A͢J - avatar
+ 3
Thanks.
9th Mar 2022, 5:42 PM
Kekusina
Kekusina - avatar