Anonymous
There are a lot of tutorials on Visual Studio, but I don't think CodeBlocks has them
Nikita
And the biggest part of em stay in shadow
Nikita
It relatives to beggs of course
Anonymous
I_Interface
Anonymous
I_Interface
W10
Lol, visual studio ofc
Anonymous
I_Interface
I m begginer
what's ur problem to go for youtube and learn how to use it for begginer ?????
Anonymous
Anonymous
I meaned thath being a beginener i need a compiler for beginner
I_Interface
Anonymous
Ok tanks all
joel
just use code blocks don't stress yourself
joel
you're already use to it no need for change
I_Interface
Dima
What the fuck, do you even read the rules?
Dima
I see a lot of a screen photos
Dima
come on
Dima
Anonymous
Nikita
What's the problem with codeblocks?
Anonymous
itsmanjeet
how to rotate this in qtcreator
Dima
Nikita
Gaats,it's you first proj?
itsmanjeet
new with qtcreator
Dima
itsmanjeet
i tried but google show result for codes . not gui of designer
Anonymous
Guys,Someone Here Use Atom For C++?
I_Interface
Atom, CodeBlocks...
what the **** ?
Anonymous
Anonymous
Ariana
Ariana
type Cltr+S to freeze terminal
Dima
stop right here, freeze!
Anonymous
using namespace std;
class gfg
{
/* Function to calculate x raised to the power y */
public:
int power(int x, unsigned int y)
{
if (y == 0)
return 1;
else if (y % 2 == 0)
return power(x, y / 2) * power(x, y / 2);
else
return x * power(x, y / 2) * power(x, y / 2);
}
};
Anonymous
anyone please make it using loops
Mat
Mat
We can help you, but we'll not do your work
Anonymous
Anonymous
but need more optimized then this
Anonymous
int pow(int a,int b)
{
int k=0;
int arr[10];
while(b>1)
{
if(b%2==0)
{
a=a*a;
b=b/2;
}
else if(b%2!=0)
{
arr[k]=a;
a=a*a;
b=(b-1)/2;
k++;
}
}
if(k>0)
for(int i=0;i<k;i++)
{
a=a*arr[i];
}
return a;
}
int main()
{
printf("%d",pow(2,27));
}
Mat
Anonymous
yes
Anonymous
but optimised way
Mat
How would you calculate 2^3?
Mat
Anonymous
german oak
I_Interface
Mat
but optimised way
Has it more optimization than a simple for loop to multiply a b times?
Jussi
Anonymous
Anonymous
2^8=2^4+2^4
Anonymous
hmm right
Anonymous
Jussi
That cannot be done by bit shifting
I_Interface
Anonymous
Anonymous
thats why asked
Anonymous
Anonymous
i need more optimized than this
Jussi
I dunno how % is implemented internally
Jussi
Most likely it is optimized already
Anonymous
hmm but the arr[10] i used takes more space
Anonymous
i need to to optimize it
Jussi
But you can do (b>>1)&1 . if it returns 1, it is same as b%2==0
Anonymous
because if the space is not used it takes space of 10 integers
Anonymous
Anonymous
Anonymous
to reduce space complexity
Jussi
Ehh