Hi.. I need help to answer the following question: 1) Write the following unstru
ID: 3608098 • Letter: H
Question
Hi.. I need help to answer the following question: 1) Write the following unstructured program segment instructured form: int row = 0 , col ; A: col = 0 ; if (col < n) goto B; goto A ; B: if ( row < n) goto C ; goto E ; C: if (mat [row] [col] == item) goto D ; col ++ ; if ( col < n) goto B; row ++ ; goto A ; D: cout << " item found " ; goto F ; E: cout << "item notfound " ; F: ; Hi.. I need help to answer the following question: 1) Write the following unstructured program segment instructured form: int row = 0 , col ; A: col = 0 ; if (col < n) goto B; goto A ; B: if ( row < n) goto C ; goto E ; C: if (mat [row] [col] == item) goto D ; col ++ ; if ( col < n) goto B; row ++ ; goto A ; D: cout << " item found " ; goto F ; E: cout << "item notfound " ; F: ;Explanation / Answer
#includeusing namespace std;int main(){int mat[3][3]={0},n=3,item=9;mat[2][2]=item;int row = 0 , col ;while(1){if(colRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.