Thanks a lot. you're a big help
:)
Type: Posts; User: robinnbastar
Thanks a lot. you're a big help
:)
oh wow it worked!
Thanks a lot.
but one more question if you can answer.
My professor put those parentheses to initialize the value (he said it was the same as int unit = 0), but why doesnt it...
I try to read from a file but it keep giving me this error and i dont know what the error mean. I try and google it but didnt see any solution.
#include<iostream>#include<iomanip>...
Wow. a lot of respond.
I don't understand all of your respond, but it was an interesting read.
I took your advices and start from the max instead and decremented it by 2.
Here the new code:
...
I just start programming so i'm not sure what a binary tree is. I'll look into it, maybe i can understand it. thanks :)
To Matticus and Stahta01: I'll try and leave the terminal work longer and...
This is my second post. Hi everyone.
ok so i started doing problem number 3 on project euler and meet another obstacle.
Here the problem:
Here my code:
#include<stdio.h>
int main()
{
...
I got it!!!!! Woooohooooo
they want the sum of even number, not odd number. so i change "c%2==1" to "c%2==0".
and it works. Off to problem number 3.
thanks everyone for replying.
okay so here the new code i got:
#include <stdio.h>
int main()
{
int sum = 0, a = 0, b = 1, c = 0;
while(b<=4000000)
{
c=a+b;
if ( (c%2==1) && (c<=4000000) )
This is the second problem from Project Euler. here the detail:
and here is my code in C:
#include <stdio.h>
int main()
{
int sum = 0, a = 1, b = 2, c=0;
while(b<4000000)