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
jasenka [17]
3 years ago
9

The length, height, and width of a cube are 10, 7, and 5 cm respectively. Write a program that calculates the volume, perimeter,

and surface area of the cube. This problem has 5 points.
Computers and Technology
1 answer:
RideAnS [48]3 years ago
8 0

Answer:

// code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

   int length=10,height=7,width=5;

   // find the volume of

   int vol=length*height*width;

   // find the surface area

   int sa=2*(length*width+length*height+height*width);

   // find the perimeter

   int peri=4*(length+width+height);

   // print the volume

   cout<<"Volume is: "<<vol<<" cm^3."<<endl;

   // print the surface area

   cout<<"Surface area is: "<<sa<<" cm^2."<<endl;

   // print the perimeter

   cout<<"Perimeter is: "<<peri<<" cm."<<endl;

return 0;

}

Explanation:

Declare and initialize length=10, width=5 and height=7.calculate volume by multiply length, width and height and assign to variable "vol".Then find the surface area as 2*(length*width+length*height+height*width) and assign it to variable "sa".Then find the perimeter as 4*(length+width+height) and assign to variable "peri". Print the volume, perimeter and surface area.

Output:

Volume is: 350 cm^3.

Surface area is: 310 cm^2.

Perimeter is: 88 cm.

You might be interested in
write a C program the prints out the size of variables with the following C data types- int, long, unsigned, long long, double,
Anit [1.1K]

<u>C program for finding size of different data types</u>

#include <stdio.h>

//driver function

int main()

{

   int a;  //declaring a of type int

   float b; //declaring b of type float

   double c; //declaring c of type double

   char d; //declaring d of type char

   long e; //declaring e of type long

   long long f; //declaring f of type longlong

   unsigned g; //declaring g of type unsigned

   // Sizeof operator is used to evaluate the size of a variable

printf(" int data type contains: %lu bytes\n",sizeof(a));/*Finding size of int */

printf("float data type contains : %lu bytes\n",sizeof(b));/*Finding size of float */

printf("double data type contains: %lu bytes\n",sizeof(c));/*Finding size of double */

printf("char data type contains: %lu byte\n",sizeof(d));/*Finding size of char */

printf("long data type contains: %lu byte\n",sizeof(e));/*Finding size of long*/ printf("longlong data type contains: %lu byte\n",sizeof(f));/*Finding size of longlong */

printf("unsigned data type contains: %lu byte\n",sizeof(g)); /*Finding size of unsigned */

   return 0;

}

<u>Output</u>

int data type contains: 4 bytes

float data type contains : 4 bytes

double data type contains: 8 bytes

char data type contains: 1 byte

long data type contains: 8 byte

longlong data type contains: 8 byte

unsigned data type contains: 4 byte

4 0
3 years ago
How do films use camera shots?
lorasvet [3.4K]
These advanced camera shots, or angles, are used in film to convey an effect or emotion rather than exemplify a sense of space. Before filming, cinematographers will write out their shot list in order to plan how each scene of their film should be shot
7 0
2 years ago
Read 2 more answers
________ is a record in a relational database.
leonid [27]

The answer that is a record in a relational database is called; A row

<h3>What is a record in relational database?</h3>

In relational databases, a record is defined as a group of related data held within the same structure. Furthermore, we can say that a record is a grouping of fields within a table that reference one particular object.

Now, in relational database, a row is called a record because each row, contains a unique instance of data or key for the categories defined by the columns.

Read more about Relational Database at; brainly.com/question/13262352

#SPJ12

4 0
1 year ago
Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
Elena-2011 [213]

Answer:

<em>Given Data:</em>

<em>myBytes BYTE 10h, 20h, 30h, 40h </em>

<em>myWords WORD 3 DUP(?), 2000h </em>

<em>myString BYTE "ABCDE"</em>

<em />

Based on the data that we are given we can conclude that:

(a).     a. EAX = 1

         b. EAX = 4

         c. EAX = 4

         d. EAX = 2

         e. EAX = 4

         f. EAX = 8

         g. EAX = 5

8 0
3 years ago
Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
zimovet [89]

Answer:

C. 7200 bps.

Explanation:

In networking, transmission lines or connectors and ports operates at a specific speed based on the port type and the cable or medium of transmission.

Baud rate is a concept in digital information technology that defines the rate of symbol per channel during transmission. The bit or data rate is the number of bits transfered in a link per second.

The relationship between baud rate and bit rate is;

Bit rate = baud rate x number of symbol bit level

To get the bit rate of a 2400 baud signal with symbol level = 8 = 2^3

Bit rate = 2400 x 3. = 7200 bps.

7 0
3 years ago
Other questions:
  • In this question, we give two implementations for the function: def intersection_list(lst1, lst2) This function is given two lis
    15·1 answer
  • Discuss the importance of employee security awareness training. What innovative ways should company’s implement security trainin
    14·1 answer
  • Identify the electronic community that is a social-networking site.
    5·2 answers
  • What are Important points to include about preventing the download of malware?
    14·1 answer
  • Write a program, named NumDaysLastNameFirstName.java, which prompts the user to enter a number for the month and a number for th
    13·1 answer
  • A person who creates a computer virus is a (1)system analyst (2) techician(3) programmer​
    11·2 answers
  • 1. Separate valid and invalid variables:
    9·1 answer
  • What is the first phase of the project process?
    14·2 answers
  • How do you put text in MS publisher?<br><br> When do you use text wrapping?
    14·1 answer
  • ; This program replaces the value in R0 with its absolute value. ; ; It does NOT modify any other registers! ; .ORIG x0200 START
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!