- #1
- 409
- 0
Code:
#include <iostream>
using namespace std;
int main()
{cout<< "Welcome to RollCast's Classic Salmon Fly Proportion Calculator!"<<endl;
cout<< "Please enter the gape of your hook in mm."<<endl;
int gape;
cin>> gape;
cout<< "Your hook gape ="; cout<< (gape); cout<< "mm"<<endl;
cout<< "Please select which tyers proportions you wish to use"<<endl;
cout<< "1: Kelson \n2: Cohen \n3: Alcott \n4: Carne \n5: Guidry \n6: Inman \n7: Boyer \n8: Ostoj \n9: Gotzmer"<<endl;
cout<< "Please input the number for which proportion you wish to use"<<endl;
int tyer;
cin>> tyer;
float dtl;
float has;
float dbb;
switch (tyer)
{case 1:
dtl =1.8;
has =0.8;
dbb =0.7;
break;
case 2:
dtl =2;
has =0.875;
dbb =0.5;
break;
case 3:
dtl =1.4;
has =0.7;
dbb =0.3;
break;
case 4:
dtl =1.8;
has =1;
dbb =0.44;
break;
case 5:
dtl =1.88;
has =1.1;
dbb =0.75;
break;
case 6:
dtl =1.9;
has =0.81;
dbb =0.69;
break;
case 7:
dtl =1.78;
has =0.5;
dbb =0.83;
break;
case 8:
dtl =2;
has =0.78;
dbb =0.78;
break;
case 9:
dtl =1.69;
has =0.58;
dbb =0.53;
break;
default:
cout << "Not a valid option" << endl;
}
cout<< "Diagonal tail length ="; cout<< gape*dtl; cout<< "mm"<<endl;
cout<< "Height above shank ="; cout<< gape*has; cout<< "mm"<<endl;
cout<< "Distance behind bend ="; cout<< gape*dbb; cout<< "mm"<<endl;
cout<< "Thanks for testing, RollCast \n Press ANY KEY to continue";
return 0;
}
When I try to debug this it stops the console window at the part:
Code:
...
float dtl;
float has;
float dbb;
switch (tyer)
{case 1:
dtl =1.8;
has =0.8;
dbb =0.7;
break;
...
but doesn't give me any error messages?