I see a bunch of syntax errors, and no reference to cin >> x[i].
Before trying to debug your logic, make sure to get it to compile.
Write a full program that reads in an arbitrary sequence of integers from the standard input, and writes them to the standard output in sorted order and with all duplicates removed. You may assume the input contains at most 100 integers .
What I have is
#include<iostream>
using namespace std;
void main()
{
int x[100}={1, 5, 15, 2, 12, 33, 55, 23, 3, 99, 44}
for(int i=0; i<100; i++)
{
if(x[i]>x[i+1])
int temp=x[i]
[i]==
}
cout<<endl;
}
1 answer