the last program I will ask about is this: #include <iostream> using namespace s
ID: 3616018 • Letter: T
Question
the last program I will ask about is this:#include <iostream>
using namespace std;
int main() {
int num [10];
int i, u;
for (u = 0; u < 10; u++) {
cout << "Enter number: ";
cin >> num [u]; }
for (u = 0; u < 10; u++) {
for (i = 9; i >= 0; i--) {
for ( ;u != i; ){
if (num[u] = num[i]) cout << num [u] << " is duplicated. ";
else cout <<"No duplicated values found. "; }
}
}
return 0;}
the program is designed to find duplicated values for 10 valuesentered, I don't understand why it didn't work as it should. Canyou tell me why?
Explanation / Answer
please rate - thanks #include using namespace std; int main() { int num [10]; int i, u,k; for (u = 0; u < 10; u++) { cout > num [u]; } for (u = 0; u < 10; u++) {k=0; if(num[u]!=-9999) {for (i = u+1; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.