#include <stdio.h>
void main()
{
long number, tempnum;
printf(“Enter an integer\n”);
scanf(“%ld”,&number);
tempnum = number;
number = number << 2; /*left shift by two bits*/
printf(“%ld x 4 = %ld\n”, tempnum,number);
}
/*——————————
Output
Enter an integer
15
15 x 4 = 60
RUN2
Enter an integer
262
262 x 4 = 1048
———————————*/
Not Satisfied ? Just search & get the result
Related posts:
- C program to accept a decimal number and conert it binary and count the number of 1′s in the binary number
- C program to reverse a given integer number and check whether it is a palindrome. Output the given numbers with suitable message
- C program to check whether a given integer number is positive or negative
- C program to check whether a given number is prime or not and output the given number with suitable message
- C program to find the number of integers divisible by 5 between the given range N1 and N2, where N1 < N2 and are integers. Also find the sum of all these integer numbers that divisible by 5 and output the computed results
