prog.c 796 Bytes
#include "stdio.h"

#define PRECIS 1000

int multiple (int n){

	int i;
	int result;
	int summ;
	result = 0;
	summ =0;
	i = 1;

	while (result < PRECIS){
		summ += result;
		printf ("Result :%i\t  Summ:%i\n",result, summ);
		result = n*i;
		i++;
	}

	return summ;
}

int multiple_check (int n, int m){

	int i;
	int result;
	int summ;
	result = 0;
	summ =0;
	i = 1;

	while (result < PRECIS){
		if ( (result % m)) {
			summ += result;
			printf ("Result :%i\t  Summ:%i\n",result, summ);
		}
		else {
			printf ("Do nothing! :)\n");
		}
			result = n*i;
			i++;

	}

	return summ;
}

main ()	{
	int total;
	int total1;
	int total2;
	total1 = multiple(3);
	total2 = multiple_check(5,3);
	total = total1 + total2;
	printf ("Total1: %i Total2: %i Total: %i\n ", total1, total2, total);

	return 0;
}