well , maybe i am really that dumb that was my first choice but it didn't seem to work so here's the whole story:
the program gets that 2 lines yes.
the numbers in the second line are temperatures, and we are searching for the highest difference between two numbers that are next to each other.
Code:
#include <stdio.h>
#include <stdlib.h>
int absz(int i) // makes positive from any kind of number
{
if (i>=0)return i;
else return -i;
}
int main() {
int n,d=0,t1,t2,i; //number,difference,temp1,temp2,i
scanf("%d\n",&n);
scanf("%d ",&t1);
for(i=0; i<n-1; i++)
{
scanf("%d ",t2);
if (absz(t2-t1)>d ) d=absz(t2-t1); // if difference here is higher than
// before then store
t1=t2; // prepares next comparison
}
printf("%d\n",d); //printing the highest difference
return 0;
}