What's new

Help! C++

Mel143r

Honorary Poster
Established
Joined
Mar 4, 2021
Posts
175
Reaction
27
Points
157
Hi guys baka meron ditong marunong gumawa ng pseudocode. Baliktad kasi ko marunong ako gumawa ng code pero pseudocode hindi hihi pede po pahelp?
eto po yung code ko.

#include <iostream>
using namespace std;

int main()
{
//Initialize array
int arr[] = {0, 1, 2, 3, 4, 5, 1, 4, 8, 9, 2};

//Calculate length of array arr
int length = sizeof(arr)/sizeof(arr[0]);
cout <<"Array : ";

//Searches for duplicate element
for(int i = 0; i < length; i++) {
for(int j = i + 1; j < length; j++) {
if(arr == arr[j])
cout <<" " <<arr[j];
}
}
return 0;
}
 

Similar threads

Back
Top