create two variables: one containing the uppercase character 'G' and the other with uppercase letter 'O'. You can name the variable anything you want as long as it's a valid name that accepted in C.
Input a random positive integer. Then, create an integer array with a size the same as the inputted integer.
Then, using loops, add random integer values into the array one by one. The number of values to be stored is dependent on the inputted odd integer on the first instruction.
Print out the list's new order in this manner, with each number separated by a space per row:
second-half values
middle value
first-half values
Refer to the sample output for a clearer view on how it is to be printed out.
Input a random positive integer, n.
Create an empty character array with a size of the inputted random positive integer, n.
In the next succeeding lines, store the n characters into the character array.
Input an integer, m, for an index. This value should be from 0 to n - 1.
Using your understanding on accessing array elements, access and print out the array element having the index position of the inputted random integer, m.
An array containing 10 predefined double values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
Each outputted value must also only show up to two decimal places.
A string with any message. Then, determine if the message contains the string, "hello".
Victor has an array of size n.He loves to play with these n numbers.each time he plays with them ,he picks up any two consecutive numbers and adds them. on adding both numbers, it costs him K*(sum of both numbers).
Find the minimum cost of adding all the numbers in the array.
i/p1:size of array
i/p2:elements of array
i/p3:value of K
o/p:return the maximum cost of adding all the numbers of the array.
Ex1:
i/p1:3
i/p2:{1,2,3}
i/p3:2
o/p:18
1. Create a C++ program to accept two integers and check if it is greater than or equal to 20.
2. Build a C++ program to read the temperature in centigrade and display a suitable message according to the temperature state below: (nested-if else/switch case)
Temp < 0 then Freezing weather
Temp 0-10 then Very Cold weather
Temp 10-20 then Cold weather
Temp 20-30 then Normal in Temp
Temp 30-40 then it is Hot
Temp >=40 then it is Very Hot
Example input: 42
Expected Output:
It is very hot.
ID Card: In Rahul's college, every student is uniquely identified by a string(unique id) which is printed on the ID card of the student.This unique id is comprised if letters and digits separated by hyphens into groups of different lengths.The college administration decides to standardize this unique id on the ID card by regrouping the letters of the previous unique id to a fixed group length.The college administration also does not want to have lowercase letters in the new id .You need to help the college administration with this task.Given the previous id, and the n0.of characters to group (group length),you need to generate the new id.NOTE: While generating the unique id,group the characters from right to left.
INPUT: The first line contains a string S representing a unique id.
Second line contains an integer N representing group length.
OUTPUT: Output should be a single string representing the new unique id.
INPUT:
2-4A0r7-4k
3
OUTPUT:
24-A0R-74K
INPUT:
5F3Z-2e-9-w
4
OUTPUT:
5F3Z-2E9W
#Hi sir We need Exact answer we believe your Experience
Number of moves:
you are given a nxn square chessboard with one bishop and k number of obstacles placed on it. A bishop can go to different places in a single move. find the total no.of places that are possible for the bishop in a single move. Each square is referenced by a type describing the row, R, and column, C, where the square is located.
explanation: given N=6 K=2
bishop position 5 2
obstacle positions (2 2), (1 5)
the bishop can move in so o/p is 6
I/p:
6 2
5 2
2 2
1 6
O/p:
6
I/p:
6 4
3 3
1 3
3 1
5 1
1 5
O/p:
7
Word Rearrange: In word Rearrange players try to score points by forming words using the letters from a 6-letters scrambled word.Given some guessed words,find the total No.of points the players scored in a particular round using the following rubric. 3-letter words are 1 pt, 4-letter words are 2 pts, 5-letter words are 3 pts, 6-letter words are 4 pts+50 pt bonus. A guessed word is invalid if the characters are not present in the scrambled word.Notes-that invalid words count as 0. your task is to find out the final score.
INPUT: The first line contains a string representing a scrambled word. The Second Line contains some spaces-separated strings representing words guessed by the player.
INPUT:
rceast
cat create sat
OUTPUT:
2
INPUT:
tacren
trance recant
OUTPUT:
108