C programming - shift three integer numbers entered by the user to the left and display them

#include <stdio.h>

int main()
{
    int num1,num2,num3,temp;
 
    printf("Enter the first number?\n");
    scanf ("%d", &num1);
 
    printf("Enter the second number?\n");
    scanf ("%d", &num2);
 
    printf("Enter the third  number?\n");
    scanf ("%d", &num3);
 
    printf("Before shifting  num1 = %d , num2 = %d, num3 = %d\n", num1,num2,num3);
 
    temp= num1;
num1= num2;
num2= num3;
num3= temp;
 
    printf("After shifting num1 = %d , num2 = %d, num3 = %d", num1,num2,num3);

    return 0;
}

Comments