🔒 Closed Help! C++

Status
Not open for further replies.

Mel143r

Fanatic
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;
}
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 276
    Views
  • 2
    Participants
Last reply from:
Arcturus

Online now

Members online
1,073
Guests online
817
Total visitors
1,890

Forum statistics

Threads
2,276,991
Posts
28,973,649
Members
1,229,682
Latest member
JhayPureno13
Back
Top