C program to calculate area of cube, C/C++ Programming

Assignment Help:

Aim: To implement program to calculate area of cube using inline function.

Code:

inline void area_cube(float side)

{

            float area;

            area=6*side*side;

            cout<<"\nArea of cube with side "<

}

void main()

{

            int side;

            clrscr();

            cout<<"Program to calculate area of Cube:";

            cout<<"\n Enter side of cube:";

            cin>>side;

            area_cube(side);

            getch();

}

 

Output:

Program to calculate area of Cube:

 Enter side of cube:7

Area of cube with side 7 cm is 294 cm²


Related Discussions:- C program to calculate area of cube

C programming, write a c program to solve exanple of lamis therom

write a c program to solve exanple of lamis therom

Basic concepts, what is the diffeerence between c and c++

what is the diffeerence between c and c++

C program to string compression, C program to string compression: Writ...

C program to string compression: Write a program to define a sting and all operations on string. void main()                                 {

Explain input output function, Input Output Most languages have "statem...

Input Output Most languages have "statements" to perform I/O . Though in C and C++ we use "functions" to perform I/O. C++ also has its own I/O mechanism - the cin and cout obje

String comparision, how to compare one file with another file. comparison s...

how to compare one file with another file. comparison should be like first line of first file compare every line of second file until it gets a blank line starting from the top and

List any six commonly found programming errors, List any six commonly found...

List any six commonly found programming errors in a C program Six commonly found errors in a C program are: 1.  Missing or misplaced  ; or  }, missing return type for a proc

Miniumshelf, write a prgm to find minimum total number of shelves including...

write a prgm to find minimum total number of shelves including the intial one required for loading process

Define some features of static storage class in c program, Define some feat...

Define some features of static storage class in c program? The features of a variable defined to contain a static storage class are as follows. Storage - memory Default

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd