//Escribir un programa que lea 2 números reales, y los escriba por pantalla ordenados  ascendentemente si son diferentes, o diga si son iguales

#include <stdio.h>

int main() {
    float a, b;

    printf("Introduce el primer numero: \nIntroduce el segundo número: \n");
    scanf("%f %f", &a,&b);
    
    if (a == b) {
        printf("Los numeros son iguales (%.2f y %.2f).\n", a, b);
    } else if (a < b) {
        printf("Orden ascendente: %.2f, %.2f\n", a, b);
    } else {
        printf("Orden ascendente: %.2f, %.2f\n", b, a);
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: