1. Write a program to take two values from user and swap their values in C Language - Program code
2. Write a Program to take three input from user print them ascending and descending order in C Language - Program code

1.

Write a program to take two values from user and swap their values in C language - Program code

Program Code :- 

/* Write a program to take two values from user and swap their values   */
   #include<stdio.h>
   #include<conio.h>
   void main()
   {
      int a,b,temp;
      clrscr();
      printf("Enter The value of A : ");
      scanf("%d",&a);
      printf("Enter the value of B : ");
      scanf("%d",&b);
      printf("Before Swapping >>>  ");
      printf("A=%d , B=%d",a,b);
      temp=a;
      a=b;
      b=temp;
      printf("\nAfter Swapping >>>  ");
      printf("A=%d , B=%d",a,b);
      getch();
   }   
            

Swap to values Program in C language - Program Code

Swap to values in C language output - Program Code

Swap to values Program output in C language - Program Code

Program Code Download :- 
Download Program to Click Here....

2.
Write a Program to take three input from user print them ascending and descending order in C program - Program Code

Program Code :- 

/* Write a Program to take three input from user print them ascending and descending order */
   #include<stdio.h>
   #include<conio.h>
   void main()
   {
      int a,b,c;
      clrscr();
      printf("Enter the value of A : ");
      scanf("%d",&a);
      printf("Enter the value of B : ");
      scanf("%d",&b);
      printf("Enter the value  of C : ");
      scanf("%d",&c);
      if(a>=b && a>=c)
      {
if(b>=c)
{
    printf("Descending : %d %d %d\n",a,b,c);
    printf("\nAscending : %d %d %d",c,b,a);
}
else
{
    printf("Descending : %d %d %d\n",a,c,b);
    printf("\nAscendiing : %d %d %d",b,c,a);
}
      }
      else if(b>=a && b>=c)
      {
if(a>=c)
{
    printf("Descending : %d %d %d\n",b,a,c);
    printf("Ascending : %d %d %d",c,a,b);
}
else
{
    printf("Descending : %d %d %d\n",b,c,a);
    printf("Ascending : %d %d %d",a,c,b);
}
      }
      else
      {
if(a>=b)
{
    printf("Descending : %d %d %d\n",c,a,b);
    printf("Ascending : %d %d %d",b,a,c);
}
else
{
    printf("Descending : %d %d %d\n",c,b,a);
    printf("Ascending :%d %d %d",a,b,c);
}
      }
      getch();
   }

Ascending and descending order values Program in C Language - Program Code

Ascending and descending order values Program in C Language - Program Code

Ascending and descending order values Program in C Language - Program Code

Ascending and descending order values Program output in C Language - Program Code

Ascending and descending order values Program output in C Language - Program Code

Ascending and descending order values Program output in C Language - Program Code

Program Code Download :- 
Download Program to Click Here....