I found many different sites that describe the topic but what I basically understand is that it is a list of prime numbers. Write? so I wrote this and after I did I found that it looks like I plagiarized it form someone. What should I do?

#include <stdio.h> #include <math.h> #include <stdlib.h> int main(){ int i; printf("Find primes up to: "); scanf("%i",&i); double t = 0.0; //create prime list int prime[i]; int c1, c2, c3; //fill list with 0 - prime for(c1 = 2; c1 <= i; c1++){ prime[c1] = 0; } //set 0 and 1 as not prime prime[0]=1; prime[1]=1; //find primes then eliminate their multiples (0 = prime, 1 = composite) for(c2 = 2;c2 <= (int)sqrt(i)+1;c2++){ if(prime[c2] == 0){ c1=c2; for(c3 = 2*c1;c3 <= i+1; c3 = c3+c1){ prime[c3] = 1; } } } //print primes for(c1 = 0; c1 < i+1; c1++){ if(prime[c1] == 0) printf("%i\n",c1); } system("pause"); return 0; }