Sunday, May 5, 2013

Program to multiply given value with 2, but without using assignment operators


#include<stdio.h>
main()
{
    int a;
    clrscr();
    printf("Enter A value:");    scanf("%d",&a);
    a=a<<1;
    printf("The mul given value:%d",a);
    getch();
}


output:

Enter A value: 2
The mul given value : 4

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More