Question: ================================================================== #include #include using namespace std; int main(){ int questions = 8; // 10111101 1> means the answer is True, 0 means the answer is

==================================================================

#include #include using namespace std;

int main(){ int questions = 8; // 10111101 1> means the answer is True, 0 means the answer is False // arr contains set of questions string arr[] ={"1+1=2","2+3=6","4*4=16","6-7=-1","25/5=5","25/0=Infinity","9*9=80","7^2=49"}; int answers = 189; // 10111101 in decimal is 189 int userInput; for(int i=questions-1; i>=0; i--){ cout<> userInput; if(userInput == (answers&1)){ // do bit wise and cout<<"Correct! "; }else{ cout<<"Incorrect! "; } answers = answers>>1; // shift bits to 1 place to the right } return 0; }

help plz how i can modify this program make it

Ask the user the questions in a random order by using another 8-bit value that indicates whether a question has been asked or not.

and Make sure that the program is refactored so that you have a function to display your binary numbers as well as the getBit function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!