Hi

Here is the program for you
enjoy!!!
Code:
#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
	int numofcompanies;
	int i=0;

	int totalamount=0;
	int totalregistrants=0;

	cout<<"Enter the number of companies: ";
	cin>>numofcompanies;
	while(i<numofcompanies)
	{
		i++;
		int amount1=0;
		int amount2=0;
		int amount3=0;
		int numofreg=0;		

		cout<<"Enter the number of people suppose to register in Company "<<i<< endl;
		cin>>numofreg;
		if(numofreg>=1 && numofreg<=3)
		{
			amount1= numofreg * 150;
		}
		else if(numofreg>=4 && numofreg <=9)
		{
			amount2=numofreg * 100;
		}
		else if(numofreg>=10)
		{
			amount3=numofreg * 90;
		}
			
		totalamount=totalamount+ amount1 + amount2 + amount3; //400
		totalregistrants=totalregistrants + numofreg; //4

		
		
	}

	if (i==numofcompanies)
	{
		cout<<"Total number of registrants are "<<totalregistrants<<endl;
		cout<<"Total Amount is "<<totalamount<<"$"<<endl;
		float averageamount= totalamount / totalregistrants;
		cout<<"Average amount is "<<averageamount<<"$" <<endl;

	}


		
		
return 0;
		

}

Last edited by shabbir; 23Mar2010 at 12:45.. Reason: Code blocks