home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT36.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-16  |  691 b   |  30 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat36.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <math.h>
  6. #include <time.h>
  7.  
  8. void main()
  9. {
  10.  time_t begin_time, over_time;
  11.  printf("¡p║Γññ, ╜╨╡y½▌....\n");
  12.  begin_time = time(NULL);
  13.  counter();
  14.  over_time  = time(NULL);
  15.  printf("░⌡ªµ«╔╢íª@»╙╢OñF %u ¼φ─┴\n",(unsigned int)difftime(over_time,begin_time));
  16. }
  17.  
  18. void counter(void)
  19.  
  20. {
  21.  int x,y;
  22.  double p;
  23.  
  24.  p = 0.0;
  25.  for(x=1;x<=1000;x++)
  26.     for(y=1;y<=100;y++)
  27.        p += sqrt((double)x*y+x+y+x/y);
  28.     printf("%f\n",p);
  29. }
  30.