1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
inessss [21]
3 years ago
5

Consider this function comment. Which of the following options is recommended in your textbook? Computes the area of a cuboid. e

paraml width the width of the cuboid eparam2 height the height of the cuboid eparam3 length the length of the cuboid ereturn the area of the cuboid double area(double width, double height, double length) double result - width +height 1ength; return result: A. The comments are adequate to describe the function. B. The lines need to end with semicolons like other C++ statements. C. The parameters should be described more completely. D. The eparaml, eparam2, eparam3 should be just eparam.
Computers and Technology
1 answer:
Tamiku [17]3 years ago
8 0

Answer:

A. The comments are adequate to describe the function.

Explanation:

C++ programming language comments starts with two forward-slash ("//") and can be written above a code statement or at the right-hand side of the code statements

The comments of the area() function with three parameters width, height, and length are adequate to describe the function as it does not need to end with a semi-colon.

You might be interested in
Riya wants to save her project work in an external device so that she can show it to her class teacher. Help her to choose the d
Alina [70]

Answer:

The answer is A) Pen Drive.

Explanation:

A pen drive is a device which can be used to store data and move it somewhere else.

6 0
3 years ago
Read 2 more answers
Assume the availability of a function is_prime. Assume a variable n has been associated with positive integer. Write the stateme
vivado [14]

Answer:

def main():

   n = int(input('Enter the value of the variable n:'))

   k=2;

   totalSum = 0

   print('The list of the prime numbers are as follows:')

   while k <= n:

       totalSum = totalSum+is_prime(k)

       k=k+1

   print('Total sum of the prime numbers:',totalSum)

def is_prime(k):

   primeNumber = 0      

   i=1

   while i<=int(k):

       if (k % i) == 0:

           primeNumber = primeNumber + 1

       i=i+1

   if(primeNumber==2):      

       print(k)

       return k;

   else:        

       return 0;

main()

Explanation:

  • Run the while loop until k is less than n.
  • Determine if the variable k is prime then add it to the totalSum variable.
  • Increment the value of k by 1.
  • Create a function isPrime to check whether the number is prime  or not by determining the factors of k which can be found using the modulus operator.
  • Call the main function at the end.

6 0
3 years ago
1. What are the advantages and disadvantages of the digital darkroom as compared to a regular
ki77a [65]

Answer:

The advantages of a digital darkroom is that it allows the photographer to make minor changes to improve a photograph. The disadvantage is that the more you want your picture to come out better you would need to waste your time or be patient to get the picture and buy a better camera.

4 0
4 years ago
Need help writing a program that reads a string if the option "E" (enter a string) is chosen, and checks if parentheses (), brac
allsm [11]

Answer:

is this even a question?...

4 0
3 years ago
(Financial application: compare loans with various interest rates) Write a program that lets the user enter the loan amount and
Tomtit [17]

Answer:

// Program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

#include <cmath>

using namespace std;

int main ()

{

// Variable Declarations

int years; double amount;

// Get input for loan amount and period (in years)

cout<<"Loan Amount: ";

cin>>amount;

cout<<"Number of Years: ";

cin>>years;

// Display table header

cout<<"Interest Rate Monthly Payment Total Payment";

// Calculate and display interest rates

// Start iteration

for (double i = 5.0; i <= 8; i += 0.125) {

cout<<i;

// Calculate Monthly Interest Rate

double monthlyRate = i / 1200;

// Calculate and Print Monthly Payment

double monthlyPay = amount * monthlyRate / (1 - 1 / pow(1 + monthlyRate, years * 12)); cout<<monthlyPay; cout<<"\n"<<(monthlyPay * 12) * years);

}

return 0;

}

// End of program

6 0
3 years ago
Other questions:
  • How is Storm chasing technology advanced? How is it becoming more advanced?
    9·1 answer
  • The main goal of human relations is to A. help you relate better with others. B. make you an efficiency expert.
    12·2 answers
  • What is the recommended solution to configure this automated behavior? UC has a requirement that an opportunity should have a fi
    8·1 answer
  • Given input of a number, display that number of spaces followed by an asterisk. (1 point) Write your solution within the existin
    15·1 answer
  • Print "userNum1 is negative." if userNum1 is less than O. End with newline Convert userNum2 to 0 if userNum2 is greater than 8.
    10·1 answer
  • When we convert an automaton to a regular expression, we need to build expression not go through certain other states. Below is
    15·1 answer
  • Define a function is_prime that receives an integer argument and returns true if the argument is a prime number and otherwise re
    9·1 answer
  • HELP PLEASE ⚠️⚠️⚠️⚠️⚠️⚠️⚠️❗❗❗❗❓❓❓<br> Why does it matter that we protect African Wild Dogs?
    10·2 answers
  • Language is Python
    15·1 answer
  • B. WAP to check whether input number is palindrome number or not using SUB...... END SUB.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!