what is wrong with my code
im trying to-
1. calculate all the registrants using a counter
2.calculate the amount using a accumulator
3.it has to be in a while loop
Code:
#include<iostream>
using namespace std;
int main()
{
//Variables
short regs = 0;
short count = 0;
double average = 0.0;
double amtDue = 0.0;
//Input
cout<<"Enter the amount of company registrants: ";
cin>>regs;
while (regs > 0)
{
if (regs >= 1)
count++;
amtDue= regs*150;
if (regs >= 4)
count++;
amtDue= regs*100;
if (regs >=10)
count++;
amtDue= regs*90;
cout<<"Enter the amount of next company registrants: ";
cin>>regs;
}
//Calculations
average= amtDue/count;
//Output
cout<<"Total Amount of Registrants:"<<count<<endl;
cout<<"Total Amount Due $ "<<amtDue<<endl;
cout<<"Average Per Registrant $ "<<average<<endl;
return 0;
}