Range of a set of number

Write a program to find the range of a set of a numbers.Range is the difference between smallest and biggest number in the list.
#include
#include
void main(void)
{
int num1,num2,num3;
printf("Enter the numbers:");
scanf("%d%d",&num1,&num2);
num3=num1-num2;
printf("The range is %d",num3);
getch();
}

Comments

Popular posts from this blog

Tip of the Day # 13

Governor Generals of Pakistan