InterviewSolution
Saved Bookmarks
| 1. |
Go through C++ code show below, and find out the possible output or outputs from the suggested Output Options(i) to (iv0. Also, write the least value and highest value, which can be assigned to the variable MyNum.#include<iostream.h>#include<stdlib.h>void main() {randomize();int MyNum,Max=5;MyNum=20+random(Max);for(int N=Mynum;N<=25;N++)cout<<C<<"*";}(i) 20*21*22*23*24*25(ii) 22*23*24*25(iii) 23*24* (iv) 21*22*23*24*25 |
|
Answer» (ii) 22*23*24*25 Minimum possible value = 20, Maximum possible value = 24 |
|