Horje
Numeri in ordine crescente C Code Example
Numeri in ordine crescente C
//Il programma legge tre numeri e li mette in ordine crescente.

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a, b, c;

    printf("Inserisci tre numeri: \n");
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);

    if (a > b && b > c)
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", c, b, a);
    }
    else if (a > c && c > b)
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", b, c, a);
    }
    else if (b > a && a > c)
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", c, a, b);
    }
    else if (b > c && c > a)
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", a, c, b);
    }
    else if (c > a && a > b)
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", b, a, c);
    }
    else
    {
        printf("i numeri in ordine crescente sono: %d %d %d\n", a, b, c);
    }

    system("pause");
    return 0;
}




C

Related
tainted love Code Example tainted love Code Example
restart nginx in alpine linix Code Example restart nginx in alpine linix Code Example
Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR Code Example Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR Code Example
two bytes to int c Code Example two bytes to int c Code Example
lerp function c Code Example lerp function c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11