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

Consider the following statements:


int num1, num2, num3;


double length, width, height;


double volume;


num1 = 6;


num2 = 7;


num3 = 4;


length = 6.2;


width = 2.3;


height = 3.4 and the function prototype: double box(double, double, double);


Which of the following statements are valid or invalid?


a. volume = box(length, width, height);


b. volume = box(length, 3.8, height);


c. cout << box(num1, num3, num2) << endl;


d. cout << box(length, width, 7.0) << endl;


e. volume = box(length, num1, height);


f. cout << box(6.2, , height) << endl;


g. volume = box(length + width, height);


h. volume = box(num1, num2 + num3);



i need assistance with this question on this link:

https://drive.google.com/file/d/1kWwKJJqmG4iihg5pYOfF8H0W8eCvZRi7/view?usp=sharing


so far i have done the following, and don't know where to go anymore, the following is a cpp file of what i have done so far:

https://drive.google.com/file/d/1CTwjUsu6JIsnLmdE0YYJE4LH-HGIEsXs/view?usp=sharing


First, read in an input value for variable numVals. Then, read numVals integers from input and output each on the same line with the character ", " between each value. End with a newline. 

Note: ", " should not be at the beginning or end of the output.

Ex: If the input is 4 -60 -35 -15 -45, the output is:

-60, -35, -15, -45


Write a C++ program that accepts marks of five students and then displays their average. The program should not accept mark which is less than 0 and mark greater than 100.


rotating alphabet T by 360 degrees in clockwise direction in C++


Consider the following function definition:



int func(int x, double y, char u, string name) {



//function body



}



Which of the following are correct function prototypes of the function func?



a. int func(x, y, u, name);



b. int func(int s, double k, char ch, string name);



c. int func(int, double, char, string);



d. func(int, double, char, string

The tap code, sometimes called the knock code, is a way to encode text messages on a letter-by-letter basis in a very simple way. Tap code has been one of the most basic communication protocols and still used to convey SOS messages and other urgent communication. The tap code uses a 5×5 grid of letters representing all the English alphabets, see Figure 1. To communicate the word "water", the cipher would be the following (with the pause between each number in a pair being shorter (single space) than the pause between letters (two spaces)),


A B C/K D E

F G H I J

L M N O P

Q R S T U

V W X Y Z


Your task is to design a program that can

i) convert any given string into a Tap code sequence

Prototype: char* convertToTapCode(char*)

ii) and A Tap code sequence to a string (char*)

Prototype: char* convertToString(char*)


Note:

1) only use following library :

#include <iostream>



Note: however, you can use char*



helping link

http://yamm.finance/wiki/Tap_code.html


In a car race game, when a car object is created it should be filled with fuel, and placed at certain x,y coordinates. Once the game is over, all cars should be deleted ? How do you handle it using c++ classes. Write suitable c++ code


This program will read integers from a file and find results from these integers.

Open the file, test to make sure the file opened. Use a loop to read the integers and process each integer as it is read. When End Of File is reached, close the file.

After all of the integers have been read and processed, print the results for the following output:

  • The integer count:
  • The sum of the integers:
  • The smallest integer:
  • The largest integer:
  • The average of the integers:

Use notepad, vim, or other simple text editor to create a file named file1.txt containing the following, with one integer per line.

Test the program two times.

Use the following data in the first test:

11
9
18
22
27
33
21
  

For the second test add an additional line containing the number 40.


Write a Program: Compute an average of integer values 

Ask the user to enter a number of values to average in the range from 2 to 10. Use a loop to make sure the entered number is within the range. Output an error message any time an invalid number is entered. Once a valid number of values is entered ask the user to input each value. Enumerate the values being asked for (see the output example). Your goal is to calculate their average and output it to the console. 


Your output should look similar to the following: 

First run 

Enter a number of values from 2 to 10: 1 

Invalid input! 

Enter a number of values from 2 to 10: 11 

Invalid input! 

Enter a number of values from 2 to 10: 6 

Enter value 1: 5 

Enter value 2: 8 

Enter value 3: 45 

Enter value 4: 11 

Enter value 5: 6 

Enter value 6: 1 

The average is 12.667 

Second run 

Enter a number of values from 2 to 10: 4 

Enter value 1: 41 

Enter value 2: 55 

Enter value 3: 12 

Enter value 4: 9 

The average is 29.250 


LATEST TUTORIALS
APPROVED BY CLIENTS