it keeps on going into a continues loop not sure why!! this is not an assignment, just Practice, i'm trying to learn, I want to make a unit converter but im not sure if this is the beast way, if you have a better idea please feel free.
/// Write a program to promt for units
//calcultes and converts units
#include <iostream>
#include <string>
#include <cmath>
using namespace std;int main () {
string re_Run, units;
do{
int f1;
cout<<"enter force: >";
cin>>f1;
cout<<"enter units: >";
cin>>units;
string units, N, kN, lb, kip;
double conv_lb, conv_N, conv_kN;
do{
if (f1<1000 && units == "N"){
cout<<f1<<" N";
}
else if (f1>1000 && units == "kN"){
cout<<f1<<" kN";
}
else if (f1>=1000 && units == "N") {//|| x== kN)
conv_N=f1/1000;
cout<<conv_N<<" kN"; //convert from N to kN
}
else if (f1<1000 && units== "lb" ){
cout<<f1<<" lb";
}
else if (f1>1000 && units== "lb" ){//|| x==kip
conv_lb=f1/1000;
cout<<conv_lb<<" kip";
}
else if (f1>1000 && units== "kip" ){
cout<<f1<<" kip";
}
else {
cout<< "please enter (lb/kip/N/kN)\n >";
cin>>units;
}
}while (units == "N" || units == "kN" || units == "lb" || units =="kip");//(units != "N" && units != "kN" && units != "lb" && units !="kip");
cout<<"re-run?";
cin>> re_Run;
}
while (re_Run == "yes");
return 0;
}