0

Need help with C++ tryg to do input validation with loops and its not working.

include <iostream> using namespace std; void Limelight(){ cout<<"What is the value of a human being?"<<endl; } int Hinata(){ int value; cout<<"Pick a value between -10 and 10!"<<endl; cin>>value; return value; } int main() { Limelight(); int dab = Hinata(); do{ if(dab>=-10||dab<=10){ cout<<"I cannot believe humans are rated so low!"<<endl; cout<<"That explains everything bad in the world!"; } else cout<<"Good Morning and goodbye"; }while(!dab); return 0; }

c++

10/30/2019 3:28:52 AM

Angelica

2 Answers

New Answer

0

#include <iostream> using namespace std; void Limelight(){ cout<<"What is the value of a human being?"<<endl; } int Hinata(){ int value; cout<<"Pick a value between -10 and 10!"<<endl; cin>>value; return value; } int main() { Limelight(); int dab = Hinata(); do{ if(dab>=-10&&dab<=10){ cout<<"I cannot believe humans are rated so low!"<<endl; cout<<"That explains everything bad in the world!"; } else cout<<"Good Morning and goodbye"; }while(!dab); return 0; }

0

thanks