Wednesday, 10 September 2014

Ascending order program in C | Free C Program

Ascending order program in C

Ascending order is a method for arranging given numbers in a sequence manner. You can give any numbers to arrange like wise. It is a simple source program to understand easily. It can be used in all LAB exams and theory exams also.

Ascending three numbers in C are used to make the three values in an ascending order by using conditional statement. It is useful for in registering a missing number to order it or for marks in revers process.

//Header files
void main()
//Program variables
    int value1,value2,value3,temp;
    clrscr();//Function is used to clear previous output
    printf("Enter first value : ");//Display function
    scanf("%d",&value1);//Getting input function
    printf("Enter second value : ");
    printf("Enter third value : ");
    if(value1>value2)//Conditional statement(if statement)
        temp = value1;
        printf("%d %d %d",value1,value2,value3)

No comments:

Post a comment

Note: only a member of this blog may post a comment.