(While loop structure)
Write a small program that displays a menu with the following options:
A program that will calculate either the diameter, circumference, or area of a circle. Select your choice.
Use the switch statement. The program is to ask for the radius of a circle. Present the menu and execute the corresponding calculation.
(while loop structure)
Write a short program that asks for your height in integer inches and then converts your height to feet and inches. Use a const symbolic constant to represent the conversion factor (Inches per ft). The only way to exit the program would be for height in inches be 999.
A customer pays a monthly fee of $37.50 for the telephone service and $3.50 per minute for long distance calls. Input the number of minutes for long distance calls. Calculate the total bill. Print the results and ask again. The only way to exit the program would be for number of minutes is -1. (while loop structure)
Find a longest common subsequence between following strings:
String1= {1, 2, 3, 4, 5, 6, 7, 8}
String2=<1,2,0,1,1,5,6,5>
(Neatly show all the steps and also write the algorithm)(Analyze the running time of the given problem).
JamEx Limited requires a program to calculate and print the commission received by a
salesperson. The program should process an undetermined number of salespersons and
appropriately terminate by a predefined input. The commission rate is based on two factors,
the amount of sales and the class to which a salesperson belongs. The input will be the
salesperson number, sales amount and class. The commission rate will be based on the
following criteria:
Class=1
If sales is equal to or less than $1000, the rate is 6 percent.
If sales is greater than $1000 but less than $2000, the rate is 7 percent.
If the sales is $2000 or greater, the rate is 10 percent.
Class=2
If the sales is less than $1000, the rate is 4 percent.
If the sales is $1000 or greater, the rate is 6 percent.
Class=3
The rate is 4.5 percent for all sales amount
Class=any other value
Output an appropriate error message.
Need answer in pseudocode
Create a program that will prompt the user to enter a number in the range 1-100 to find my favourite number. If the number is less than favourite number, print “Too low...guess again: ”. If the number is greater than favourite number, print “Too high...guess again: ”. Ask again and exit until the number entered is the correct favourite number. in C++ program (while loop)
Sort the given sequence of numbers using Bubble sort. Write all the
steps involved. 13, 15, 2, 6, 14, 10, 8, 7, 3, 5, 19, 4.
Find an optimal solution for the knapsack instance n=6 and M=13,
(p1 , p2 ,..., p6 )=(8, 5, 13, 7, 6, 15)
(w1 , w2 ,..., w6 )=(3, 2, 4, 6, 2, 5)
Using the Rabin Karp algorithm, find the pattern string in the given text. Pattern: “fed”, Text: “acfeddadfdec”. Write all the steps involved.
Create an application that will display a multiplication table number entered by a user. The program must display the first five multiplication values