fork download
  1.  
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5.  
  6. int main ()
  7. {
  8. /* variable definition: */
  9.  
  10. float Sum, Avg, NewSum, NewAvg;
  11. // Loop through 2 Students
  12.  
  13. {
  14. // reset Sum to 0
  15. Sum = 4.0;
  16. Avg = Sum/2.0;
  17. NewSum += 80 + 90 + 100;
  18. NewAvg = NewSum/3;
  19. printf( "Average \n",Sum);
  20. printf( "New Average \n",NewAvg);
  21.  
  22. }
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Average 
New Average