Question: write a program that gives this output:

Enter the number of numbers: 69

Sorry! a maximum of 20 is allowed

Enter the number of numbers; 2

Enter 1st number: -15

No negative numbers!

Enter 1st number: 8

Number must be divisible my 3!

Enter 1st number: 3

Enter 2nd number: 12

The sum is: 15

here's what i tried and failed ofcourse :'(

#include <stdio.h>

#include <conio.h>

int main (void)

{

int numofnums, num, sum = 0, count = 0;printf("Enter Number of numbers ");

scanf("%d", &numofnums);do {printf("The Sum of the numbers entered is " "%d", sum);

if (numofnums <= 20){

printf("Enter Number");

scanf("%d", &num);if (num >0){if (num%3 == 0) {

sum = sum + num;

count = count + 1;

} else {printf("Sorry! Number must be divisible by 3!");}} else {printf("Sorry! Number must be positive!");}}while (count != numofnums);}else {printf("Number must not exceed 20!");}

getch();

}

it only runs one way, as in you can enter any number over 20 >.<

please help