Tilbage til slide -- Tastaturgenvej: 'u'  forrige -- Tastaturgenvej: 'p'  næste -- Tastaturgenvej: 'n'          control/max-prog-1.c - En variant med blokke - alternativ 'coding style'.Lektion 3 - slide 17 : 25
Program 2

#include <stdio.h>

int main(void) {

  double x, y, max;

  printf("Enter two real numbers: ");
  scanf("%lf %lf", &x, &y);

  /* Find the maximum of x and y */
  if (x < y){ 
    max = y;
  }
  else{ 
    max = x;
  }   

  printf("The maximum of x and y is %12.8f\n", max);
  
  return 0;
}