Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Make a program that will accept an integer and loop for the same number of times as that of the inputted integer and input random integers and add it to the array/list one by one, per line. Afterwards, make your program accept another random integer.





Using that final integer, compare from your array/list if the final integer's value is also present in your current array/list. If so, print "Present"; otherwise, print "None".





Start coding now!



Input



The first line contains the size of the array.


The next lines contain the integers.


The last line contains an integer to be searched.



5


3


21


2


5


23


2


Output



A line containing a string.



Present

7. Upper, Dis-upper

by CodeChum Admin

Make me a program that accepts a size of the character array and its values. Then, count the number of uppercase vowels that are in it.


Easy, right? Then go and code as if your life depends on it!


Tip: After your scan for the size, add a space after the placeholder like this so that the newline character directly after the number won't be scanned as one of the characters:

scanf("%d ", &size);

Input


1. Size of the array

2. Characters of the array

Output


The first line will contain a message prompt to input the size of the array.

The second line will prompt to input the characters of the array.

The last line contains the count of the uppercase vowels.


Enter·the·size·of·the·array:·19
CodeChum·is·AWEsome
Count·=·2

5. Search and Rescue

by CodeChum Admin

Make a program that will accept an integer and loop for the same number of times as that of the inputted integer and input random integers and add it to the array/list one by one, per line. Afterwards, make your program accept another random integer.

Using that final integer, compare from your array/list if the final integer's value is also present in your current array/list. If so, print "Present"; otherwise, print "None".


Start coding now!

Input


1. Size of the array

2. Elements of the array

3. Integer to be searched

Output


The first line will contain a message prompt to input the size of the array.

The succeeding lines will contain message prompts to input the elements of the array.

The next line will contain a message prompt to input the integer to be searched.

The last line contains the appropriate message.


Enter·the·size:·5
Element·#1:·3
Element·#2:·21
Element·#3:·2
Element·#4:·5
Element·#5:·23

Enter·the·integer·to·be·searched:·2
Present




4. Arraying 102

by CodeChum Admin

We've already made arraying/listing the easy way, but how about arraying/listing and printing the list in reverse order?


Make a program that will input an integer and then using loops, add items on an array/list one by one for the same number of times as that of the first inputted integer. Then, print out the array/list in reverse order, that is, starting from the last item on the array/list down to the first one, each in separated lines.


Input


1. Size of the array

2. Elements of the array

Output


The first line will contain a message prompt to input the size of the array.

The succeeding lines will contain message prompts to input the elements of the array.

The next lines will contain the elements of the array in reversed order.


Enter·the·size:·5
Element·#1:·1
Element·#2:·64
Element·#3:·32
Element·#4:·2
Element·#5:·11

Reversed·Order:
Element·#1:·11
Element·#2:·2
Element·#3:·32
Element·#4:·64
Element·#5:·1

1. Square to the Next Level

by CodeChum Admin

We've already tried printing out the values of an array in reversed order, right? Today, we shall compute for the squares of all the numbers.


There's already a predefined array/list containing 100 integer values. Loop through each values, compute their squares, and display them.


Output


Multiple lines containing an integer.



4
9
25
10000
49
9
25
9
1
16
.
.
.

Make a c++ program that will print the average of the values of the three quizzes using function. The values of the quizzes are input values from the user.


5.20 (Displaying a Rectangle of Any Character)

–Modify the function created in Exercise 5.19 to form the rectangle out of whatever character is contained in character parameter fillCharacter.

–Thus if the sides are 5 and 4, and fillCharacter is "@", then the function should print the following:


Enter a character to fill the rectangle: a


Enter sides: 4 5


a a a a a

a a a a a

a a a a a

a a a a a


Give at least three examples that show different features of string slices. Describe the feature illustrated by each example. Invent your own examples. Do not copy them for the textbook or any other source.


Write a while loop that calculates the sum of the cubes of numbers starting from 1 to 40 (inclusive). That is, the loop prints the foloowing value 1 + 23 +33 + ... +403. Make sure to define any variables you may need.


You need to submit the code and program output.

 

Q1. you will write a C++ program that uses a for statement to calculate and display the sum of all even numbers between 5 and 24 inclusive on the screen.


Q2. Write statements that assign random integers to the variable n in the following ranges: Use the random function to generate the numbers. Put the statements in a C++ Program and run it.


a) 1 ≤ n ≤ 87 


b) 1 ≤ n ≤ 925 


c) 0 ≤ n ≤ 424 


d) 2000 ≤ n ≤ 3138


e) –16 ≤ n ≤ 65




LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS