Create a program that allows the user to enter 10 integers in an array. Your task is to determine
if the user entered a negative number. If yes, display the negative numbers.
Create a program that allows the user to enter 10 integers in an array. Then ask the user to input an integer. Your task is to determine if the integer is found in the list/array.
2. Write a simple decryption program using string functions which will apply the Substitution Method. Here is the given Substitution Table.
Substitution Table:
* A
$ E
/ I
+ O
= U
Write one dimensional array C++ program that ask to the user to enter the array size
and reads n integers, finds the largest of them, and count its occurrences. Suppose
(20 points) KWIC is an acronym for ”Key Word In Context”. This is the most common format for
concordance indexes in documents. It is also the starting point for most spelling and grammar checkers
in word processors. You will use the classes in the C++ Standard Library to write a program that
creates such an index for text read from the standard input.
Begin by writing a C++ function that has a single argument: a string containing a file name and
returns a reference to a list of stings. Open the file and then read each word in the text file into a
C++ STL list of strings. Return
example of shorthand if-else statement and multi variable declaration and explain each part of your line code/snippet.
Enter an integer to search in the array: 2
2 is found in the array
Enter a string to search in the array: bedazzled
bedazzled is found in the array
Write a program that has these overloaded search methods to do array searching:
boolean search(int[] arr, int searchKey) – searches an integer array given a search key value, returns true if searchKey is found, false if not.
Hint:
boolean found=false;
for(int i=0; i<arr.length; i++){
if( ){//compare the array element with the search key value
//action taken if found
}
}
//return something
boolean search(String[] arr, String searchKey) – searches an array of strings given a search key value, returns true if searchKey is found, false if not.
(read Comparing_Strings.doc)
In the main method, you can declare and initialize the two arrays with random values, for example:
int[] intArray={7,3,2,8,1,0,9};
String strArray={"Enchanted","Bedazzled","Divine","Delighted","Elegant"};
Use the methods in the program.
Write a c++ program to read 10 integers from the keyboard in the range 0-100 and count how many of them are larger than 50
Design a program that converts an octal number into binary numbers. Use a constructor.