Telegramy
Articles
About
« Rev
@programminginc
1031
Fwd »
Anonymous
thank you so much
Anonymous
hi
Anonymous
#include "gmp.h" #include <stdio.h> //Use: gcc -lgmp factorial.c void factorial(unsigned int n, mpz_t result) {   mpz_set_ui(result, 1);   while (n > 1) {       mpz_mul_ui(result, result, n);       n = n-1;   } } int main() {   unsigned int n = 34530;   mpz_t fact;   mpz_init(fact);   factorial(n, fact);   mpz_out_str(stdout, 10, fact);   mpz_clear(fact);   return 0; }
Anonymous
does this works I tried but error
Subbu
/saved
Subbu
/howtoprogram
Anonymous
S.
3, 2, 10
S.
oh shit
S.
not difficult but easy to make a mistake
Anonymous
Ok now tell the ans will be what ?
S.
3, 2, 10
Anonymous
3, 2, 10
How
S.
How
Just be careful that after m = a[i++], the i will increase by 1.
Anonymous
According to me i = 6
Anonymous
Cause a[1] =5
Anonymous
Now ++ a[i] so ++ 5 then 6
S.
a[0] == 5
S.
a[1] == 1
Anonymous
Ohh
Anonymous
Yes yes
Anonymous
Indexing start at 0
Anonymous
Sorry
Anonymous
Ok
Anonymous
a[1]= 1
Anonymous
++a[1] means 2
Anonymous
How it's 3 ?
S.
Take out a pencil and a piece of paper. YOu can do it
S.
printf prints i, j, m
S.
not the array itself
Anonymous
hi
Pratham
i=2, j=2
Pratham
Somebody explain m..
Pratham
m=11 I guess
Pratham
Coz i you've declared is a global variable...it is same throughout...so i will be 2 previously. a[2]=10.
nibu
How it's 3 ?
its incremented in 3rd line
nibu
Somebody explain m..
i can
Daniele°
i=2 j=2 m=15
Anonymous
m=a[2++]; m = a[3] m = 15;
Anonymous
m=a[2++]; m = a[3] m = 15;
https://stackoverflow.com/questions/4445706/post-increment-and-pre-increment-concept
Anonymous
Hey please provide resources for c++
klimi
Hey please provide resources for c++
No
klimi
Hey please provide resources for c++
Learn to read
Anonymous
Ok then tell me some good places to find good books or blog posts etc
Anonymous
Google
Anonymous
Tell me what you know u are experienced and gone through lot of stuff google is always there
Anonymous
Some major websites
Anonymous
http://lmgtfy.com/?q=good+c%2B%2B+resources
Anonymous
Is this so hard?
Anonymous
Nice
Anonymous
Got to learn a new thing
Anonymous
This animation 😍
Anonymous
Can I also make such🤔
Ariana
._.
Anonymous
Thanks
Anonymous
._.
Yep
Kaushal
😄
Mickyas
Mickyas
Pleas do it using loop
S.
http://lmgtfy.com/?q=good+c%2B%2B+resources
Got a very useful site, thx
Mat
Pleas do it using loop
No
Mat
There is not a question
nibu
Pleas do it using loop
txt me .. i can hlp
S.
Pleas do it using loop
do { printf("loop used.\n");}while(0); printf(" *\n ***.......");
Pratham
m=a[2++]; m = a[3] m = 15;
Wah...👌
klimi
Pleas do it using loop
How much
klimi
I guess option ladder b
Dima
/warn read rules, post your code with formatting or any other sharing service
klimi
Welcome
klimi
/warns
Dima
why
Dima
one is enough
klimi
klimi
Go ahead dima
Dima
oh that one was before
Dima
gg
klimi
Ye
Dima
when?
klimi
IDK dima
klimi
I'm on phone
« Rev
@programminginc
1031
Fwd »