🔒 Closed Help! C++

Status
Not open for further replies.

Mel143r

Established
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
  • 294
    Views
  • 2
    Participants
Last reply from:
Arcturus

Trending Topics

Online now

Members online
1,003
Guests online
5,957
Total visitors
6,960

Forum statistics

Threads
2,354,391
Posts
29,383,483
Members
1,079,440
Latest member
Rubykesha
Back
Top