Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #define DELKA 100
- void drawArray(int a[], int len, int width);
- int getHighestValue(int a[], int len);
- int main ( void ) {
- int pole[DELKA];
- int i;
- for ( i = 0; i < DELKA; i++) {
- pole[i] = i+2;
- }
- printf ("%d", getHighestValue(pole, DELKA));
- return 0;
- }
- void drawArray(int a[], int len, int width) {
- int lines = len/width;
- int cellWidth = log10(getHighestValue(pole, DELKA));
- int i;
- for ( i = 0; i <= lines; i++) {
- }
- }
- int getHighestValue(int a[], int len) {
- int i,x = 0;
- for ( i = 0; i < len; i++) {
- if (a[i] > x)
- x = a[i];
- }
- return x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement