Advertisement
Heretiiik

Untitled

Nov 18th, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. #define DELKA 100
  6.  
  7. void drawArray(int a[], int len, int width);
  8. int getHighestValue(int a[], int len);
  9.  
  10. int main ( void ) {
  11.     int pole[DELKA];
  12.     int i;
  13.     for ( i = 0; i < DELKA; i++) {
  14.         pole[i] = i+2;
  15.     }
  16.     printf ("%d", getHighestValue(pole, DELKA));
  17.  
  18.     return 0;
  19. }
  20.  
  21.  
  22. void drawArray(int a[], int len, int width) {
  23.     int lines = len/width;
  24.     int cellWidth = log10(getHighestValue(pole, DELKA));
  25.     int i;
  26.     for ( i = 0; i <= lines; i++) {
  27.    
  28.     }
  29. }
  30.  
  31. int getHighestValue(int a[], int len) {
  32.     int i,x = 0;
  33.     for  ( i = 0; i < len; i++) {
  34.         if (a[i] > x)
  35.             x = a[i];
  36.     }
  37.  
  38.     return x;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement