Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~129 People Reached
Favorite Forums
Favorite Tags
c++ x 2
Member Avatar for alexa12345

For Input 4 15.01 15 3 3.01 The value of 'avg' is becoming 9.00. I don't understand why this should be 9.01. Please help. [CODE] #include<stdio.h> #include<math.h> double round(double x) { return floor(x * pow(10.0,2.0) + 0.5)/pow(10.0,2.0); } int main() { //freopen("10137.txt","r",stdin); //freopen("out1.txt","w",stdout); long i,n; double sum,avg,sum1,a[1005]; while(scanf("%ld",&n) == 1 …

Member Avatar for mvmalderen
0
129