Skip to main content

Difference between two numbers

#include <stdio.h>
int main()
{
  int a, b, c;
  printf("Enter two numbers\t:\t");
  scanf("%d%d", &a , &b );
  c = a - b;
  printf("The difference between %d and %d is %d", a, b, c);

  return 0;
}

Enter two numbers :  5 6
The average of 5 and 6 is -1 

Comments