You people humble me with your willingness to help newbs.
struct primeList {
int prime;
struct primeList *next;
};
int importList(struct primeList *latestPrime, struct...
Type: Posts; User: Canucklehead
You people humble me with your willingness to help newbs.
struct primeList {
int prime;
struct primeList *next;
};
int importList(struct primeList *latestPrime, struct...
Doesn't it get more complicated when -> gets involved?
Good catch, thanks.
But I want to be able to use latestPrime and thisPrime (thisPrime for neatness's sake) later in main().
Basically, how can you make a function f that can access pointer x, y and...
struct primeList {
int prime;
struct primeList *next;
};
int main(int argc, char *argv[]) {
time_t start,end;
time (&start);
int lastTry = atoi(argv[1]);...
The other, faster program (which i changed a little to add a timer):
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <iostream>
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[]) {
time_t start,end;
time (&start);
int lastTry = atoi(argv[1]);...
Thanks.
Is this method fast?
Is there a faster one?
Would this method work if x is a multiple of 10?
Please help with the problem described in the title.
I'm writing a little thing to find prime numbers.
I'm looking for a really fast method.
I'm a very early beginner.
I have thought of...
Great! Thanks.
In case you were wondering, this isn't homework. I'm still in high school. This is for my own personal health.
What is the most efficient way to get the last 2 digits of an integer into a seperate variable? What about the 3rd and 4th last?
Ex.
123456
int a should == 12
int b should == 34
int c should ==...