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 write a code for reverse of string without using string functions?

2093


Can you return null in c?

1111


Is there a way to compare two structure variables?

1079


string reverse using recursion

2396


what is the height of tree if leaf node is at level 3. please explain

2106


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2035


How #define works?

1061


Explain the use of #pragma exit?

1141


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1104


Why & is used in c?

1127


how to find binary of number?

4369


Explain what is the advantage of a random access file?

1082


What does typedef struct mean?

1060


What is use of pointer?

1026


What is the purpose of sprintf?

1083