Represent the sum of first terms of the series 3+33+333+.........
using the sigma notation.
by CodeChum Admin
Make me a program that accepts two random strings. Then, count the number of vowels that are in each of the strings and put it on separate variables.
Finally, for the survival of the vowels, subtract the total count of vowels of the first string to the vowels of the second string then print out its difference.
Easy, right? Then go and code as if your life depends on it!
Input
Two lines containing a string on each.
C++·is·fuN
CodeChum·is·AWEsomeOutput
A line containing an integer.
6We've already made listing an array the easy way, but how about listing and printing the array 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 ascending order. After doing that, print the array again on the next line in reverse order, that is, starting from the last item on the array/list down to the first one, each in separated lines.
Input
The first line contains the size of the array.
The next lines contains the items of the array (integers).
5
1
64
32
2
11Output
The first line contains the elements of the array printed in ascending order.
The second line contains the elements of the array printed in reversed order.
1·64·32·2·11
11·2·32·64·1by 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
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
2Output
A line containing a string.
Presentby CodeChum Admin
I have an array of 3 numbers here with me that's already in the code editor, but I want you to add some more to this list by inputting some more numbers yourself in one line and then, print out only the even numbers from the array.
Can you do that for me?
Input
The first line contains the number of elements, n, to be added.
The next line contains the n integers separated by a space.
5
33·54·32·11·8Output
Multiple lines containing an integer.
2
54
32
8I want you to make an array of numbers for me. All you have to do is make a program that will let me input any random integer in one line. Afterwards, it will then print out all the numbers I've inputted, backwards, on separate lines.
Care to do that for me?
Input
The first line contains the size of the array.
The next line contains the integers separated by a space.
5
1·64·32·2·11Output
Multiple lines containing integers on each.
11
2
32
64
1Matrix Rotation
You're given a square matrix A of dimentions N X n. You need to apply below 3 operations.
Rotation: It is represented as R S where S is an integer in {90,180,270...} which denotes the number of degrees to rotate .You need to rotate the matrix A by angle S in the clockwise direction.
The angle of rotation S will always be in multiples of 90 degrees.
Update: It is represented as U X Y Z. In initial matrix A , you need to update the element at row index X and column index Y with value Z.
Querying: It is represented as Q K L.You need to print the value at row index K and column index L of the matrix of the matrix A.
Sample Input 1
2
1 2
R 90
Q 0 0
Q 0 1
R 90
Q 0 0
U 0 0 6
Q 1 1
-1
Sample Output 1
3
1
4
6
Sample Input 2
2
5 6
7 8
R 90
Q 0 1
R 270
Q 1 1
R 180
U 0 0 4
Q 0 0
-1
Sample Output 2
5
8
8
Differentiate y= cos (6x +2)
Thesis statement on substance abuse
If the degree of freedom is 20, what is the 96th percentile of t-distribution