// mult7.cpp : Defines the entry point for the console application.
//This program produces mult of 7 (7 -> 70) EXCEPT those div by 3

#include "stdafx.h"

int main(int argc, char* argv[])
{

	int sevens, sum, counter, avg;

	sevens=7;                      /*starting point in sequence */
	sum=0;                         /*init accumulator */
    counter=0;                     /*count of num of terms in seq */

	printf("The total of ");

	while (sevens <= 70) {         /*check for ending point in seq */

	  if (sevens % 3 != 0) {        /*exclude nums div by 3 */

           printf("%d  ", sevens);
		   sum = sum + sevens;
		   counter = counter + 1;

	  }  /*end if sevens */
		  
	  sevens = sevens + 7;         /*get next possible num in sequence */


	} /* end while sevens */

	printf("\nis equal to %d \n", sum);

    avg = sum / counter;
	printf("The integer average is %d\n", avg);
	return 0;
}