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 C++ function, indexSmallest(), that takes a two-dimensional array on integers with 10


rows and 1 0 columns. Along with the array, other arguments are two integers. The function will search


the array of its smallest element. The two integers will represent the indices (row and column) of the


smallest element. Also, write a program to test your function.



Sample Run:


1)


The smallest element is 1.


It is located on row 9 and column 8.



2)


The smallest element is 2.


It is located on row 5 and column 4.



3)


The smallest element is 5.


It is located on row 5 and column 0.

Write a program that prompts the user to input 2 strings then output the string with greater value. Use character


strings in implementing your solution.


Sample Run 1

Enter first string: hello

Enter second string: Hello

hello


Sample Run 2

Enter first string: hello

Enter second string: hi

hi


Write a program that prompts the user to input a string, then convert each lowercase character in it to uppercase,

and all uppercase character to lowercase. You must use character array in implementing your solution.


Sample Run:

Enter a string: Computer PROGRAMMING is Fun!

cOMPUTER programming IS fUN!



No, it’s not!



Write a program that prompts the user to input as string, then replace each vowel the exists on that string with the


character '*'. You must use character array in implementing your solution.


Sample Run:

Enter a string: 'A' is for "Apple", 'a' - 'a' ... "apple".

'*' *s f*r "*ppl*", '*' - '*' ... "*ppl*


Array

Create a program that will ask a user to enter 5 positive numbers.

The program will then display the largest and the smallest value that was entered by the user.


write a program to calculate average accelaration


•      The Easy Living resort hotel wants you to write a program to calculate the base charge for its guests. The program should prompt the user for the room type ('G' for garden view, 'P' for pool view, or 'L' for lake view) and the number of days the guest is to stay. The program also should prompt for whether the guest is to have a refrigerator in the room and whether there is to be an extra bed in the room.


•      The Easy Living resort hotel wants you to write a program to calculate the base charge for its guests. The program should prompt the user for the room type ('G' for garden view, 'P' for pool view, or 'L' for lake view) and the number of days the guest is to stay. The program also should prompt for whether the guest is to have a refrigerator in the room and whether there is to be an extra bed in the room.


Write a program that prompts the user to input a string and outputs the string in uppercase letters. You must use a

character array to store the string.


Sample program:

Enter a string: hello world!, welcome to programming

HELLO WORLD!, WELCOME TO PROGRAMMING


Write a program in C++ using repetition structures to print the following pattern. You are not allowed to use nested loops. (USE WHILE LOOP OR DO WILE LOOP)

****

***-

**--

*---



LATEST TUTORIALS
APPROVED BY CLIENTS