NEED URGENT HELP PLEASE REPLY ASAP

Jun 10, 2011 at 2:37am

#include <iostream>
#include <string>
#include<stdlib.h>
#include<windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <cstdlib>

using namespace std;

int main()
{


string Note=" ";
double D3,Csharp3, F2, B2, Gsharp2, A2, G, G2, Fsharp1, G3,Fsharp2, G4;
int Fsharp3;
string name="pa";
char choice=' ';
int count=0;
D3 =1174;
Csharp3 = 1108;
F2 = 698.46;
B2 = 987.77;
Gsharp2 = 830;
A2 = 880;
G = 196;
G2 = 392;
Fsharp1 = 369.99;
G3 = 783.99;
Fsharp2 = 739.99;
G4 = 1568;
Fsharp3 = 1480;


do
{
system ("color 0B ");
Note="";

cout << "Enter note, the first key is F#3"<< endl;
getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3"|| Note=="f#3")
{Fsharp3 = 1480;
Beep(Fsharp3,200);
}
else
if (Note=="play again" || Note=="Play Again")
Beep(1480,200);
else
cout<<"you entered it Wrong\n";
}while (Note!="F#3"&&Note!="f#3");
system("CLS");




do
{
system ("color 0B ");
Note="";
cout<<"Please enter first key followed by the second which is g#3\n";

getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3 G4"||Note=="f#3 g4")
{
Fsharp3 = 1480;
G4 = 1568;
Beep(Fsharp3,200);
Beep(G4,200);
}
else
if (Note=="play again" || Note=="Play Again")
{Beep(1480,200);
Beep(1568,200);
}
else
cout<<"you entered it Wrong\n";
}while (Note!="F#3 G4"&&Note!="f#3 g4");
system("CLS");

do
{
system ("color 0B ");
Note="";
cout<<"Please enter first key followed by the second which is g#3\n";

getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3 G4 G4"||Note=="f#3 g4 g4")
{Fsharp3 = 1480;
G4 = 1568;
G4 = 1568;
Beep(Fsharp3,200);
Beep(G4,200);
Beep(G4,200);
}
else
if (Note=="play again" || Note=="Play Again")
{Beep(1480,200);
Beep(1568,200);
Beep(1568,200);
}
else
cout<<"you entered it Wrong\n";
}while Note=="F#3 G4 G4"&&Note=="f#3 g4 g4"));
system("CLS");

do
{
system ("color 0B ");
Note="";
cout<<"Please enter first key followed by the second which is g#3\n";

getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3 G4 G4 G4"||Note=="f#3 g4 g4 g4")
{Fsharp3 = 1480;
G4 = 1568;
G4 = 1568;
G4 = 1568;
Beep(Fsharp3,200);
Beep(G4,200);
Beep(G4,200);
Beep(G4,200);
}
else
if (Note=="play again" || Note=="Play Again")
{Beep(1480,200);
Beep(1568,200);
Beep(1568,200);
Beep(1568,200);
}
else
cout<<"you entered it Wrong\n";
}while Note=="F#3 G4 G4 G4"&&Note=="f#3 g4 g4 g4"));
system("CLS");

do
{
system ("color 0B ");
Note="";
cout<<"Please enter first key followed by the second which is g#3\n";

getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3 G4 G4 G4 F#2"||Note=="f#3 g4 g4 g4 f#2")
{Fsharp3 = 1480;
G4 = 1568;
G4 = 1568;
G4 = 1568;
Fsharp2 = 739.99;
Beep(Fsharp3,200);
Beep(G4,200);
Beep(G4,200);
Beep(G4,200);
Beep(Fsharp2,200);
}
else
if (Note=="play again" || Note=="Play Again")
{Beep(1480,200);
Beep(1568,200);
Beep(1568,200);
Beep(1568,200);
Beep(739.99,200);
}
else
cout<<"you entered it Wrong\n";
}while Note=="F#3 G4 G4 G4 F#2"&&Note=="f#3 g4 g4 g4 f#2"));
system("CLS");

do
{
system ("color 0B ");
Note="";
cout<<"Please enter first key followed by the second which is g#3\n";

getline(cin,Note);
cin.ignore(100,'\n');
if (Note=="F#3 G4 G4 G4 F#2 G3"||Note=="f#3 g4 g4 g4 f#2 g3")
{Fsharp3 = 1480;
G4 = 1568;
G4 = 1568;
G4 = 1568;
Fsharp2 = 739.99;
G3 = 783.99;
Beep(Fsharp3,200);
Beep(G4,200);
Beep(G4,200);
Beep(G4,200);
Beep(Fsharp2,200);
Beep (G3,200);
}
else
if (Note=="play again" || Note=="Play Again")
{Beep(1480,200);
Beep(1568,200);
Beep(1568,200);
Beep(1568,200);
Beep(739.99,200);
Beep (783.99,200);
}
else
cout<<"you entered it Wrong\n";
}while Note=="F#3 G4 G4 G4 F#2 G3"&&Note=="f#3 g4 g4 g4 f#2 g3"));
system("CLS");

system("pause>nul"); //end if
return 0;
}



this is showing m some problem with beep can some tell me whta is the problem?
Jun 10, 2011 at 2:46am
Jun 10, 2011 at 2:46am
closed account (3hM2Nwbp)
Define "Some Problem" please...
Jun 10, 2011 at 3:03am
Oh my bad lol slipped my mind, ok if you compile and run it it shows a problem on the second do lopp where you have to enter 2 commands. so not exactlly sure why it shows that so if you guys know can u please tell me
Jun 10, 2011 at 3:10am
shows a problem on the second do lopp


What is it showing? How is that wrong? What do you want?
Jun 10, 2011 at 3:14am
Nvm i figured out the problem see the becakets are not done properly so it wasn't compiling
Topic archived. No new replies allowed.