cant get Error to stop showing..

Ever time I input the Exp it just displays the error message? this is driving me crazy...






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
*    Input Base number
*    WHILE base is not quit
*	    IF (Base is in range)
*          input exponit
*		   
*           IF (exponent is in range)	
*		      
				Int answear = 1
				
				  FOR(exponent number of time)
*			      ans =  base * ans
*			      total = total + base
*		        
				  END FOR 
*		          
*				  Display Total
*				 

				  IF (base is out of range)
*			          Display error
*		              END IF
*					  IF (exponent is out of range)
*			              Display error
*						  END IF 
*    Prompt user for next input 
*    END WHILE
* END Lab 04 - Calculate the total for park
**********************************************************************/
#include <cmath>
#include <iostream>
#include <iomanip>
using namespace std;

void main()
{
	// local constants 
	const int QUIT =     -1;
	const int BASE_MAX = 10;
	const int BASE_MIN =  0;
	const int EX_MAX   = 10;
	const int EX_MIN   =  1;
	// local variables
	
	int Base_Total;
	int Base;
	int Exp = 1;
	int Total;
	int Count = 0;
	/*********************************************************************/
 
	//Prompt for number input
	cout << "\n\n\n\n\n\n\n";
	cout << setw(52)  << "--------------------------------------"  << endl;
	cout << setw(50)  << " Input A base Number Between 1 & 10   "  << endl;
	cout << setw(50)  << "           Or -1 to quit              "  << endl;
	cout << setw(52)  << "--------------------------------------"  << endl;
	cout << "\n" << setw (46)  << "Base:  ";
	cin >> Base;

	// Clear the screen 
	system ("cls");

	//Calculate the product of the two numbers
	
	while(Base != QUIT)
	{
	  if (Base < BASE_MAX && Base > BASE_MIN)
	  {
		cout << "\n\n\n\n";
		cout << setw(46) << "Enter Exponent" << endl;
		cin  >> Exp;
	  }
	  		
	 if (Exp < EX_MAX && Exp > EX_MIN)
	 {
	     for(int Count; Count == Exp; Count++)
		    
			 Base_Total = Base * Base;
			 Total = Base_Total + Base;
	  
	 }

	  else  (Base > BASE_MAX && Base < BASE_MIN);
	  	
	  {
			cout << "\n\n\n\n";
			cout<< setw(46) << "Error" << endl;
	  }
	}
Please give the exact error message and the line that it occurs on.
void main() is non standard, although it's allowed by some compilers as an extension. main()'s return type must be int.

Also notice your main() is missing a closing curly brace.
Topic archived. No new replies allowed.