Can you write in BASIC language??? Will ratelifesaver //program to display the u
ID: 3609651 • Letter: C
Question
Can you write in BASIC language??? Will ratelifesaver//program to display the unique numbers entered.
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
in main()
{
int i:
int index = 0;
int myNumber;
int myArray{20];
//Prompt user for input
cout << "n A program to display theunique numbers entered. "';
for (int count = 1; count <=20;count++)
{
cout<< " Enter number" << count<< " : ";
cin >>myNumber;
if (myNumber< 10 || myNumber > 100)
{
cout << " Invalid range.";
continue;
}
// Search in the arrayfor the existence of the number
for ( i = 0; i< index; i++)
{
if (myArray[i] ==myNumber)
break;
}
if ( i ==index)
{
myArray[index] = myNumber;
index++
}
else
cout <<"tduplicate";
}
// Output the unique number the user entered
cout << " Unique numbers in thearray are as follows.";
for ( i= 0; i < index; i++)
cout << " " <<myArry[i];
cout << " ";
system ("pause");
return 0;
}