SHARE
TWEET

Untitled

a guest Mar 20th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <math.h>
  3. main ()
  4. {
  5.     int N,n,max,min,razlika,o,i;
  6.     printf ("Unesite N\n");
  7.     scanf ("%D", &N);
  8.     printf ("Unesite neki od brojeva\n");
  9.     scanf ("%d", &n);
  10.     max=n;
  11.     min=n;
  12.     printf ("Unesite ostale brojeve\n");
  13.     for (i=0;i<N-1;i++)
  14.     {
  15.         scanf ("%d", &o);
  16.         if (o>max)
  17.             o=max;
  18.         if (o<min)
  19.             o=min;
  20.     }
  21.     razlika=max-min;
  22.     printf ("Razlika iznosi: %d ", razlika);
  23.     getch();
  24. }
RAW Paste Data
Top