Need assistance :D

i'm using Visual Studio 2012 and it keep telling me that there is two errors but
not in the code itself if i'm not mistaken :/
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
90
91
92
93
94
95
96
97
98
99
100
101
#include <iostream>
#include <string>
using namespace std;
void Add(int a,int b)
{
	cout<<"The Add result is: "<<a+b<<endl;
}
void Mult(int a,int b)
{
	cout<<"The Mult result is: "<<a*b<<endl;
}
void Sub(int a,int b)
{
	int d = a-b;
	if(d<0)
	{
		char choice;
		cout<<"the answer is samller than 0 which mean it's in the negative numbers"<<endl<<"Do you want to renter the two number (answer with y for yes and n for no)"<<endl;
		cin>>choice;
		if(choice == 'y'|| choice == 'Y')
		{
			cout<<"please enter the first number"<<endl;
			cin>>a;
			cout<<"please enter the second number"<<endl;
			cin>>b;
		}
	}
	cout<<"The sub result is: "<<a-b<<endl;
}
void Divide(int a,int b)
{
	while(b == 0)
	{
		cout<<"there is no operation over zero"<<endl<<"please renter the over number"<<endl;
		cin>>b;
	}
	cout<<"The Divide result is: "<<a/b<<endl;
}
int Main()
{
	int x,z;
	char m = 'y';
	char operationchoice;
	cout<<"Wlcome to Ahmed Sayed Moussa Calcalter using C++ code ^_^ "<<endl;
	while(m == 'y' || m == 'Y')
	{
		cout<<"Enter the first number , the operation sign then the second number"<<endl;
		cin>>x>>operationchoice>>z;
		switch(operationchoice)
		{
		case '/':
			Divide(x,z);
			break;
		case '+':
			Add(x,z);
			break;
		case '-':
			Sub(x,z);
			break;
		case '*':
			Mult(x,z);
			break;
		}
		cout<<"Do You Want To Make any more operations (asnwer with y for yes and no for no)"<<endl;
		cin>>m;
	}
	return 0;
}
void HelpMenu()
{
	cout<<"Help Menu"<<endl;
	cout<<"Enter the first number , the operation sign then the second number"<<endl;
	cout<<"-----------------------------"<<endl;
}
void Sign()
{
	cout<<"Enter + for Add"<<endl;
	cout<<"Enter - for Sub"<<endl;
	cout<<"Enter * for Mult"<<endl;
	cout<<"Enter / for Divide"<<endl;
	cout<<"-----------------------------"<<endl;
}
void SubMenu()
{
	int r;
	cout<<"Enter 1 for Help Menu"<<endl<<"Enter 2 for the Sign Menu"<<endl;
	cin>>r;
	if(r == 1)
	{
		HelpMenu();
	}
	if(r == 2)
	{
		Sign();
	}
	else
	{
		cout<<"Please enter number 1 or 2 and not a thired number"<<endl;
		SubMenu();
	}
}
Ok what are the errors? We're not psychic, and I doubt anyone is going to feel like scanning your code for some unknown errors.

EDIT:
Eh I say I won't scan, then I do anyways.

int Main()
should be
int main()
Last edited on
thanks for replaying ^_^
Topic archived. No new replies allowed.