Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when user give a number it multiply with 9 without
useing '+' and '*' oprator

Answer Posted / vaibhav nigam

/*
your answer is quite correct but its better to use
r=-r; instead of r=abs(r);

well i would have done it like :

*/

#include <iostream>
using namespace std;
int main()
{
int k;
cin >> k;
k=(k<<4)-(k<<2)-(k<<1)-k;
cout << k << endl;
return 0;
}

//here no loop is used..

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to introdu5ce my self in serco

2049


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1431


What are the salient features of c languages?

1139


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1689


Why is c not oop?

1038


What does double pointer mean in c?

1258


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1204


What is structure padding and packing in c?

1124


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6960


what is reason of your company position's in india no. 1.

2411


What are all different types of pointers in c?

1058


Stimulate calculator using Switch-case-default statement for two numbers

3038


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1171


Should I learn data structures in c or python?

1072


What is difference between constant pointer and constant variable?

1402