Questions: 11 448

Answers by our Experts: 10 707

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

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++ :

  • Defines a structure called ThreeDPoint that represents a point in a 3D space. The point has an x , a y , and a z coordinate.
  • Defines a function getPointData() to accept values of x, y and z coordinates of a point from the user.
  • Defines another function for operator overloading of less than (<) operator. The function compares x coordinates of two structure variables and returns true if that of first one is less than that of second. If both are equal, it compares y coordinates of two structure variables and returns true if that of first one is less than that of second. If they are also equal, it compares z coordinates of two structure variables and returns true if that of first one is less than that of second. For example if input values for two points, say p1 and p2 are (1, 1, 2) and (1, 1, 0) then p1 < p2 returns false and p2 < p1 returns true.
  • Define two variables of the structure ThreeDPoint, namely- p1 and p2 in the main() function and print the smaller of the two points.

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 10

the output is: 

-15 -10 -5 0 5 10

Ex: If the second integer is less than the first as in:

20 5

the 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;

LATEST TUTORIALS
APPROVED BY CLIENTS