Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1.
Write a c++ program that takes your name from keyboard and display the following if your name has 10 character your name is too long if it comprise between 5 and 9 character your name is medium if it comprise less than 5 character your name is too Short
Write a C++ program that reads 10 integer numbers and stores them in an array Numbers, sorts the numbers using the bubble sort algorithm, and displays the array elements whenever there is an element swap. This C++ program must have three functions: 1. reading the array's ten elements, 2. displaying the array's elements, 3. The array elements are being sorted.
C++ code:
Make a recursive function which displays the fibonacci series before a number that is entered by the user.
Requirements:
No global declarations
Test run in main
Diagram:
Also draw diagram to show how the recursive call is working
Write an algorithm, draw a flowchart and write a program code to display 3*3 Identity Matrix.
WAP in C++ :
Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the value is less than or equal to the second integer.
Ex: If the input is:
-15 10the output is:
-15 -10 -5 0 5 10Ex: If the second integer is less than the first as in:
20 5the output is:
Second integer can't be less than the first.For coding simplicity, output a space after every integer, including the last.
Write a c++ program to display the Fibonacci series of the first 50 integer
The IIIT-Delhi robotics club has organized a Robothon. n robots are placed along
the edge of a circular area at the middle of the OAT. Each robot will move along arbitrary tracks
inside the circle while leaving behind a heat signature along its trail. However, they have been
programmed not to cross their own trail or the trail of another robot, neither will they ever move
out of the circle. In case a pair of robots i and j meet at any point, they are removed from the scene
and the club will pay a reward sum of M[i, j] to the owners of these robots. Note that some robots
can keep moving infinitely without ever meeting another one. Given the reward matrix M where
M[i, j] = M[j, i], design a polynomial time algorithm that determines the maximum money the
club might potentially end up spending. For this particular problem, give a very brief justification
of the recurrence.
a. (overSpeed > 10) ? fine = 200 : fine = 75;
b. (fuel >= 10) ? drive = 150 : drive = 30;
c. (bill >= 50.00) ? tip = 0.20 : tip = 0.10;