Loop issue

Pages: 12
No change to header issue
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
#include <iostream>
#include <cctype>
int menu();
int OptA();
//int OptB;
//int optC;
using namespace std;



	// PLACE HOLDERS FOR TESTING ONE SECTION AT A TIME.
	//int low (low = 999);
	//const int SENTINEL = -9999;

	int menu();
	//Trying to get a repeatable menu option
{
		int choice();
		for (menu);
			cout<<"Select a chioce from the menu below.";
			cout<<" A- Find the highest number in a series. ";
			cout<<" B- find the lowest number in a series. ";
			cout<<"C- Exit ";
				cout<< "Enter your selection ";
		cin>> choice;
		
			if (choice = a)
				do OptA
			if (choice = b)
				do OptB
			if (choice = c)
				do OptC
	return int;
}
//this option should output only the highest number for a usre defined limit to end the loop. Then return to menu.
	int OptA();
			{
		int number()
		int limit;
		int high (high = -999);
		int counter = 0;
		cout<<"how many number would you like to compare? ";
		cin>>limit;
		cout<<"Enter your numbers. ";
		cout<< endl;
		cin>>number;
			if (number > high);
				int high = number;
			int counter = counter + 1;
			while (counter < limit);
			else cout<< "The highest number is " << high);
			cout<< endl);
				return int;
			}
// OptB should output the lowest number entered with a sentinel value ending the loop. Then return to menu
// OptC exits the program. 
put your main function(where execution of the program starts) before the two function definitions and your good to go.
Topic archived. No new replies allowed.
Pages: 12