hello,,,
can someone help me ,,i am beginner in this,,,
this is my home work:
Write an algorithm that will be of three integers find the maximum and minimum, and calculate the difference between the two. Write an algorithm for the programming language C and draw a diagram.
yes i say,,i am first year on univerzity electrotehnical ing ,,,,or explain some....i write some but i donot know how to continueee..........i dont know is it ok
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
int b;
int c;
int min;
int max;
a=2;
b=4;
c=6;
if(b>a)
{
max = b, min = a;
}
if(b<a)
{
min = b, max = a;
}
if(c>a)
{
max = c, min = a;
}
if(c<a)
{
max = a, min = c;
}
if(c>b)
{
max = c, min = b;
}
if(c>b)
{
max = b, min = c;
}
i donot know men,,,, imposible to get a result (max - min ) i donot know have tooo do this ,,,,if you know you write me some exampes or help me in some way....