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
SCORPION-xisa [38]
4 years ago
12

Write a C function int rect Area (int len, int wid) that returns the area of a rectangle with length len and width wid. Test it

with a main program that inputs the length and width of a rectangle and outputs its area. the value in the main program, not in the function.
Sample Input

6 10

Sample Output

The area of a 6 by 10 rectangle is 60.
Computers and Technology
2 answers:
salantis [7]4 years ago
8 0

Answer:

int rectArea (int len, int wid)//Function

{

   return len*wid;//return statement.

}

//Main function to test.

int main()

{

   printf("The area of a 6 by 10 rectangle is %d",rectArea(6,10));

  return 0;

}

Explanation:

  • The above function code is in c language, in which there is one return statement which returns the product of the len and wid variable, which is the area of a rectangle.
  • When a user wants to run this program then he needs to mention a header file as studio.h and write the program on c editor and then compile and run that program.
  • The user also needs to define the main function and call this function as shown in the above code, then this code will be run successfully.
sergeinik [125]4 years ago
8 0

Answer:

b

Explanation:

You might be interested in
100 POINTS!!!!!!!
bogdanovich [222]

A)

<u>~</u><u>Intellectual property needs to be protected because it usually has</u><u> </u><u>psychological</u><u> </u><u>value.</u>

Hope this helped you- have a good day bro cya)

4 0
3 years ago
Read 2 more answers
You are a database administrator. Chantelle comes to you asking for help on how to access all the data in one row of the databas
Novosadov [1.4K]
I believe the answers would be A and B. Because you have to fulfill  Chantelle's wishes and you have to access their data. Which I am guessing would require a database backup.  

I hope this helps. 
7 0
3 years ago
A low-pass first-order instrument has a time constant of 20ms. Find the frequency,in hertz, of the input at which the output wil
Lubov Fominskaja [6]
A design was operating at a maximum clock frequency of f and the clock had no jitter. if the clock started to have jitter of t secs, what will be the new frequency?
5 0
3 years ago
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i
Amanda [17]

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

   //Prompt and receive user input

       System.out.println("Enter number of Steps");

       int numSteps = in.nextInt();

       double numMiles = numSteps/2000;

       //Print the formated number of miles

       System.out.printf("The equivalent miles is %.2f ",numMiles);

   }

}

Explanation:

  • This is solved using Java programming language
  • Scanner class is imported and used to receive user input (number of steps walked)
  • To convert number of steps to number of miles, we divide by 2000, Since the question says the pedometer treats walking 2,000 steps as walking 1 mile.
  • Output the number of miles to 2 decimal places using java's printf() method
6 0
3 years ago
Read 2 more answers
What can be done to reduce the occurrence of policy
natali 33 [55]
What can be done to reduce the occurence of policy?


5 0
4 years ago
Other questions:
  • Before entering a loop, the first input, or ____, is retrieved.
    14·1 answer
  • Bitlocker uses the computer's __________ chip to store encryption keys and does not rely on individual user credentials. securit
    10·1 answer
  • Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate
    7·1 answer
  • . What is the difference between a combinational circuit and sequential circuit? Give example of each.
    8·1 answer
  • You insert a comment in a worksheet by using a command on the ____ tab on the Ribbon.
    13·1 answer
  • anyone got a class named computer literacy? or sum similar to using Microsoft programs? i need a lotttt of help, im 3 units behi
    12·2 answers
  • Joshua always participate in team meetings and comes up with ideas and suggestions. what quality is he demonstrating?
    7·1 answer
  • Print ___________ command is used for adding numbers.​
    14·1 answer
  • How did transistors revolutionize the world of computers?
    15·1 answer
  • Which format has the largest file size?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!