Questions: 1 978

Answers by our Experts: 1 850

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

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
.
.
.

7. Gathering Negativity

by CodeChum Admin

I’ve been too positive in life, but I figured that it really isn’t good to always be positive since life has to be balanced, don’t you think so?


That aside, let’s make a program that asks for random integers, positive or negative, and sums up all the negative integers only! Well, the loop stops when the inputted value is 0, though.


And don’t forget to print the sum of negative integers afterwards! Thanks!

Input


1. A series of integers

Output


Multiple lines containing message prompts to input integers.

The last line contain the sum of the negative integers.



Enter·n:·1
Enter·n:·3
Enter·n:·-1
Enter·n:·-2
Enter·n:·-4
Enter·n:·5
Enter·n:·-1
Enter·n:·-2
Enter·n:·0
Sum·of·negatives·=·-10

6. The GCD

by CodeChum Admin

The greatest common divisor, also known as GCD, is the greatest number that will, without a remainder, fully divide a pair of integers.


Now, I want you to make a program that will accept two integers and with the use of loops, print out their GCD. Make good use of conditional statements as well.


Off you go!

Input


1. First integer

2. Second integer

Output


The first line will contain a message prompt to input the first integer.

The second line will contain a message prompt to input the second integer.

The last line contains the GCD of the two integers.



Enter·the·first·integer:·6
Enter·the·second·integer:·9
GCD·of·6·and·9·is·3

5. "Even" Now

by CodeChum Admin

I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.


How about that?


Input


1. Value of n1

2. Value of n2

Output


The first line will contain a message prompt to input the value of n1.

The second line will contain a message prompt to input the value of n2.

The succeeding lines contain an integer.



Enter·n1:·3
Enter·n2:·10
10
8
6
4

4. Negative Fusion

by CodeChum Admin

As I've said before, there are three types of numbers: the positive, the zero, and the negative ones. Today, we shall pay attention only to the negative ones now. Make a loop that will accept random decimal/float numbers. When the user inputs 0, the loop will terminate and then output the sum of all negative numbers inputted in 3 decimal places.


Let's code this.


Input


1. A series of decimal numbers

Output


The first lines will contain message prompts to input the decimal numbers.

The last line contains the sum of all negative numbers with 3 decimal places.



Enter·a·number:·2.4434
Enter·a·number:·-1.3433
Enter·a·number:·-2.444
Enter·a·number:·6.432
Enter·a·number:·0
Sum·of·all·negatives·=·-3.787

3. FizzBuzz 2.0

by CodeChum Admin

Remember the game of FizzBuzz from the last time? Well, I thought of some changes in the game, and also with the help of loops as well. Firstly, you'll be asking for a random integer and then loop from 1 until that integer. Then, implement these conditions in the game:

  • print "Fizz" if the number is divisible by 3
  • print "Buzz" if the number is divisible by 5
  • print "FizzBuzz" if the number is divisible by both 3 and 5
  • print the number itself if none of the above conditions are met

Input


1. An integer

Output


The first line will contain a message prompt to input the integer.

The succeeding lines will contain either a string or an integer.



Enter·n:·15
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz

1. Not Less than Three

by CodeChum Admin

Make a program that will accept an integer and loop from 1 to that integer. Then, print all numbers from that range that are greater than 3.


Let's go!


Input


1. An integer

Output


The first line will contain a message prompt to input the integer.

The succeeding lines contain an integer.


Enter·n:·8
4
5
6
7
8
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS