Solution to Project Euler 8

In Problem 8 you need to find the greatest product of five consecutive digits of a 1000-digit number that is given.

To find the solution I simply read the number into an array and then traversed it comparing the product of five digits at a time.

#include <stdio.h>

int main(){
  int vet[1000];
  int z,max,c,j,i=0;

    if (c<0 || c>9)



  for (j=0;j<1000;j++){
    if (z>max)



  return 0;

Leave a Reply

Your email address will not be published. Required fields are marked *