Search
 
SCRIPT & CODE EXAMPLE
 

C

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: 
");
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);

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

    system("pause");
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: curl authorization header 
C :: Using PostgreSQL array to store many-to-many relationship using sqlalchemy 
C :: c boolean 
C :: bootstrap 5 modal not working vue js 3 
C :: how to open jupyter notebook in local disk D 
C :: is 33 prime number 
C :: addition of two matrix in c 
C :: successeur d’un entier donné 
C :: operators priority in c 
C :: array loop in c 
C :: remove first character from string c 
C :: c bit access struct 
C :: check if the c code is a palindrome 
C :: Futter Square Button 
C :: malloc in c 
C :: fopen function in c 
C :: c language time() function 
C :: callback c++ c 
C :: fgets function in c 
C :: prime number c program 
C :: struct main function c in unix 
C :: HOW TO ADD FORM IN BOOTSTRAp 
C :: check if pid exists c 
C :: add to beginning of array c 
C :: sh: tailwindcss: command not found 
C :: sockaddr_in c 
C :: c strcmp 
C :: C Program to Check Whether Character is Lowercase or Not using islower function 
C :: c comment 
C :: get docker 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =