Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <math.h>
  4. int main()
  5. {
  6.     int i,x;
  7.     float n[800],y=1;
  8.     float A[800];
  9.     float b[800];
  10.     {
  11.             for(x=0;x<800;x++)
  12.             {
  13.                 n[x]=pow(y,3)+y+5;
  14.                 b[x]=7*pow(y,3)+y+1;
  15.                 y++;
  16.             }
  17.     }
  18.     /*for(x=0;x<50;x++)
  19.     {
  20.         printf("%.2f\n",n[x]);
  21.     }*/
  22.     x=0;
  23.     for (i=0;i<800;i++)
  24.     {
  25.         A[i]=b[x]/n[x];
  26.         printf("%f\n",A[i]);
  27.         x++;
  28.     }
  29.     int e= int (A[799]+0.5);
  30.     printf("%d\n",e);
  31.     int m;
  32.     for (m=0;m<100;m++)
  33.     {
  34.         if(e==m)
  35.         {
  36.             printf ("bravo");
  37.             printf (" niz tezi u %d",e);
  38.             getch ();
  39.             return 0;
  40.            
  41.         }
  42.     }
  43.     printf("niz tezi u beskonacno");
  44.     getch();
  45.     return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement