#include<stdio.h>
void increasing(float num1, float num2, float num3)
{
float save = 0;
printf("increasing: ");
if(num1 > num2)
{
save = num2;
num2 = num1;
num1 = save;
}
if(num2 > num3)
{
save = num3;
num3 = num2;
num2 = save;
}
if(num1 > num2)
{
save = num2;
num2 = num1;
num1 = save;
}
printf("%.1f %.1f %.1f", num1, num2, num3);
}
void main()
{
float num1, num2, num3;
printf("enter number 1: ");
scanf("%f", &num1);
printf("enter number 2: ");
scanf("%f", &num2);
printf("enter number 3: ");
scanf("%f", &num3);
increasing(num1, num2, num3);
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter